/* ============================================================
   Dark Aero — glass theme for satella
   Tokens in :root; glass recipe repeated per component.
   ============================================================ */

/* JetBrains Mono for code blocks (local woff2 in /fonts/) */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/JetBrainsMono-Regular.woff2') format('woff2');
}

:root {
  --aero-bg: #0a1420;
  --text: #eaf4fc;
  --text-dim: rgba(234, 244, 252, 0.75);
  --accent: #8fd0f5;
  --accent-strong: #b5e2ff;
  --accent-glow: rgba(126, 200, 240, 0.45);
  --violet-echo: #b0a2de;
  --glass-fill: rgba(15, 30, 46, 0.55);
  --glass-border: rgba(224, 240, 252, 0.42);
  --glass-highlight: rgba(255, 255, 255, 0.32);
  --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --radius: 10px;

  /* Frutiger Aero glossy recipes (blue-tinted) --------------------
     The "55% hard split" is the signature: a mirror-bright top half
     meeting a darker bottom half on a single pixel row, reading as a
     polished glass reflection. */
  --plaque-gloss: linear-gradient(
    to bottom,
    #cfe0ef 0%,
    #7f96ab 3%,
    #24323f 55%,
    #0a121b 55%,
    #10212f 98%,
    #060c13 100%
  );
  --button-gloss: linear-gradient(
    to bottom,
    #ffffff 0%,
    #cbe9ff 3%,
    #4aa0d8 40%,
    #276f9e 55%,
    #123a5a 55%,
    #2d76a6 100%
  );
  --button-gloss-hover: linear-gradient(
    to bottom,
    #ffffff 0%,
    #dcf1ff 3%,
    #5ab2ea 40%,
    #2f83b6 55%,
    #17496f 55%,
    #47a0d6 100%
  );
  /* thin top sheen used as a ::before reflection strip */
  --sheen: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(126, 200, 240, 0.45) rgba(10, 20, 32, 0.6);
}

body {
  color: var(--text);
  font-family: "Segoe UI", "Segoe UI Variable Text", system-ui, -apple-system, "Noto Sans", sans-serif;
  line-height: 1.6;
  background-color: var(--aero-bg); /* fallback */
  background-image: url("/images/9_bg.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
  cursor: url("/images/aero-normal.cur"), auto;
}

/* aurora depth overlay: above wallpaper, below all content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 18% 8%, rgba(90, 160, 235, 0.16), transparent 70%),
    radial-gradient(ellipse 55% 40% at 85% 92%, rgba(140, 110, 220, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(5, 12, 20, 0.30), rgba(5, 12, 20, 0.55));
}

a, button {
  cursor: url("/images/aero-link.cur"), pointer;
}

input, textarea {
  cursor: url("/images/aero-text.cur"), text;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background-color: rgba(126, 200, 240, 0.35);
  color: #ffffff;
}

::-moz-selection {
  background-color: rgba(126, 200, 240, 0.35);
  color: #ffffff;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(10, 20, 32, 0.6); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(160, 215, 255, 0.5), rgba(90, 150, 210, 0.5));
  border-radius: 5px;
  border: 1px solid rgba(165, 212, 250, 0.35);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(180, 225, 255, 0.65), rgba(110, 170, 230, 0.65));
}

strong, b {
  color: var(--violet-echo);
}

ul:not(.post-list) {
  list-style: none;
  padding-left: 1em;
}
ul:not(.post-list) li::before {
  content: "❄ ";
  margin-right: 0.25rem;
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
}

.content a:not(.post-list-title):not(.post-list-more) {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.content a:not(.post-list-title):not(.post-list-more):hover {
  text-decoration: underline;
  text-shadow: 0 0 10px var(--accent-glow);
}

.content img {
  max-width: 100%;
  height: auto;
}

/* h1 — the article title: the glossy metallic banner, the Aero signature. */
.content h1 {
  position: relative;
  display: block;
  color: #eaf4fc;
  font-weight: 400;
  font-size: 1.9rem;
  letter-spacing: 0.01em;
  line-height: 1.3;
  margin: 0.2em 0 0.9em;
  padding: 7px 18px 9px;
  border-radius: 5px;
  border-top: 1px solid rgba(190, 220, 245, 0.55);
  border-bottom: 1px solid #000;
  background: var(--plaque-gloss);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 3px 12px rgba(0, 0, 0, 0.5);
}

/* the glass reflection strip — only on the title banner */
.content h1::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.2%;
  width: 97.6%;
  height: 45%;
  border-radius: 4px 4px 45% 45%;
  background: var(--sheen);
  opacity: 0.26;
  pointer-events: none;
}

/* h2 / h3 — glossy section tabs that hang off the container's left wall:
   the plate bleeds left to the edge while its text lines up with body copy. */
.content h2, .content h3 {
  position: relative;
  display: inline-block;
  color: #dcecfa;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.3;
  margin-left: calc(-1 * var(--pad-x) - 1px);
  padding-left: calc(var(--pad-x) + 1px);
  border-radius: 0 4px 4px 0;
  border-top: 1px solid rgba(180, 212, 240, 0.45);
  border-bottom: 1px solid #000;
  background: var(--plaque-gloss);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    3px 5px 9px -4px rgba(0, 0, 0, 0.5);
}
.content h2 {
  font-size: 1.2rem;
  margin-top: 1.9em;
  margin-bottom: 0.7em;
  padding-top: 3px;
  padding-right: 16px;
  padding-bottom: 5px;
}
.content h3 {
  font-size: 1.02rem;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  padding-top: 2px;
  padding-right: 14px;
  padding-bottom: 4px;
  border-top-color: rgba(180, 212, 240, 0.3);
}

/* h4 — a light glowing label, no plate */
.content h4 {
  color: var(--accent-strong);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  margin: 1.4em 0 0.5em;
  text-shadow: 0 0 12px rgba(126, 200, 240, 0.35);
}

/* h5/h6 stay as small uppercase accents */
.content h5, .content h6 {
  color: var(--accent-strong);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  text-shadow: 0 0 12px rgba(126, 200, 240, 0.35);
}

/* ---------- window chrome: page, header, content, footer ---------- */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1rem 0;
}

/* Nav — one glossy metallic bar (same plate as the heading bars) that
   hangs halfway off the top edge of the canvas, mirroring the logo. */
.site-nav {
  position: absolute;
  top: 0;
  right: 1.75rem;
  transform: translateY(-50%);
  z-index: 22;
  display: flex;
  align-items: stretch;
  border-radius: 6px;
  border-top: 1px solid rgba(190, 220, 245, 0.5);
  border-bottom: 1px solid #000;
  background: var(--plaque-gloss);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 3px 12px rgba(0, 0, 0, 0.5);
}

.site-nav a {
  color: #dcecfa;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 18px 10px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  transition: background-color 0.12s ease, color 0.12s ease;
}

/* thin divider between segments */
.site-nav a:not(:first-of-type) {
  box-shadow:
    inset 1px 0 0 rgba(0, 0, 0, 0.5),
    inset 2px 0 0 rgba(255, 255, 255, 0.08);
}

.site-nav a:hover {
  color: #ffffff;
  background: rgba(140, 200, 245, 0.18);
  /* override the broad .content a:hover rule (higher specificity) */
  text-decoration: none !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85) !important;
}

/* the snowflake separators are replaced by the segment dividers */
.site-nav .nav-sep {
  display: none;
}

.header_image {
  position: absolute;
  top: 0;
  left: 1.75rem;
  transform: translateY(-50%);
  z-index: 22;
  display: block;
  background-image: url("/images/bannerT.png");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
  width: 318px;
  height: 60px;
  text-decoration: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.content {
  --pad-x: 2rem;
  position: relative;
  width: 100%;
  max-width: 960px;
  flex-shrink: 0;
  margin: 2.5rem 0 2rem;
  padding: 3.75rem var(--pad-x) 2rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03) 45%, rgba(0, 0, 0, 0.16)),
    var(--glass-fill);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    inset -1px -1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    var(--glass-shadow);
}

.content p:first-of-type {
  margin-top: 0;
}

.site-footer {
  width: 100%;
  max-width: 960px;
  flex-shrink: 0;
  margin: auto 0 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid rgba(165, 212, 250, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02) 50%, rgba(0, 0, 0, 0.18)),
    rgba(12, 24, 38, 0.45);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 8px 28px rgba(0, 0, 0, 0.40);
}

.footer-buttons {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  line-height: 0;
  flex: 1;
  justify-content: flex-start;
}

.footer-btn { line-height: 0; }

.footer-add-btn {
  align-self: center;
  line-height: 1;
  font-size: 0.8rem;
  white-space: nowrap;
}

.footer-gif {
  display: block;
  height: 31px;
  width: auto;
}

.footer-webring {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 0;
}
.footer-webring-arrow {
  color: var(--text);
  text-decoration: none;
  font-size: 1.25rem;
  line-height: 1;
}
.footer-webring-arrow:hover {
  color: var(--accent-strong);
  text-shadow: 0 0 10px var(--accent-glow);
}
.footer-webring img {
  display: block;
  height: 31px;
  width: auto;
}

.friends-webring {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  line-height: 0;
}
.friends-webring img {
  display: block;
  height: 31px;
  width: auto;
}

.footer-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: flex-end;
}

.footer-icon { line-height: 0; }

.footer-icon img {
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.85;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.footer-icon:hover img {
  opacity: 1;
  filter: brightness(0) invert(1) drop-shadow(0 0 6px var(--accent-glow));
}

/* ---------- home ---------- */

.home-intro img {
  max-width: 100%;
  height: auto;
  display: block;
}

.home-hero-bio {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 50%, rgba(0, 0, 0, 0.14)),
    rgba(18, 34, 52, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.20);
}

.home-hero-bio ul {
  padding-left: 0.5rem;
  margin: 0 1.5rem 0 0;
}
.home-hero-bio ul li {
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.home-hero-bio ul li strong {
  min-width: 7.5em;
  flex-shrink: 0;
}
.home-hero-bio ul li::before {
  content: none !important;
}

/* Windows 7 gallery / Photo Viewer "photo frame": white matte,
   thin gray hairline, soft drop shadow. */
.home-hero-bio img {
  flex-shrink: 0;
  width: 200px;
  max-width: 200px;
  height: auto;
  display: block;
  border: 6px solid #fdfdfd;
  border-radius: 2px;
  background: #fdfdfd;
  box-shadow:
    0 0 0 1px #9aa0a6,
    0 4px 14px rgba(0, 0, 0, 0.45);
  transform: rotate(-3deg);
  transition: transform 0.2s ease;
}

/* Straighten the photo on hover, like picking it up off the desk. */
.home-hero-bio img:hover {
  transform: rotate(0deg);
}

.home-hero-bio > p:first-child {
  margin: 0;
  flex: 0 0 auto;
}

.home-hero-bio > p:not(:first-child) {
  flex: 1;
  min-width: 0;
  margin: 0 0 0.5em;
}
.home-hero-bio > p:last-child {
  margin-bottom: 0;
}

.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.home-now,
.home-contact {
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  overflow: hidden; /* clip the full-bleed heading bar to the card corners */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 50%, rgba(0, 0, 0, 0.14)),
    rgba(18, 34, 52, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.20);
}

/* Full-width glossy heading bar, flush to the top edge of the card
   (bleeds out past the card padding on top/left/right). */
.content .home-now-heading,
.content .home-contact-heading {
  display: block;
  margin: -1.25rem -1.25rem 1.15rem;
  padding: 6px 16px 8px;
  border-radius: 0;
  border-top: none;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.home-now-content,
.home-contact-content {
  margin: 0;
}
.home-now-content p:last-child,
.home-contact-content p:last-child {
  margin-bottom: 0;
}

.home-recent {
  margin-top: 2rem;
}

/* Not in a padded card — a plain full-width banner at the top */
.content .home-recent-heading {
  display: block;
  margin: 0 0 1rem;
  padding: 6px 16px 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- post list ---------- */

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-list-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(150, 195, 235, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg,
    rgba(120, 180, 225, 0.06),
    rgba(90, 140, 190, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.post-list-item:hover {
  background: rgba(140, 200, 245, 0.1);
  border-color: rgba(165, 212, 250, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 18px rgba(126, 200, 240, 0.18);
}

/* Windows 7 gallery "photo frame" matte around each thumbnail */
.post-list-thumb {
  flex-shrink: 0;
  display: block;
  box-sizing: border-box;
  width: 160px;
  height: 120px;
  padding: 5px;
  overflow: hidden;
  border-radius: 2px;
  background: #fdfdfd;
  box-shadow:
    0 0 0 1px #9aa0a6,
    0 4px 14px rgba(0, 0, 0, 0.35);
}

.post-list-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1px;
}

.post-list-body {
  flex: 1;
  min-width: 0;
}

.post-list-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.7rem;
  row-gap: 0.1rem;
  margin-bottom: 0.4rem;
}

.post-list-title {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.35em;
}

.post-list-title:hover {
  text-decoration: underline;
  text-shadow: 0 0 12px var(--accent-glow);
}

.post-list-date {
  font-size: 0.9em;
  color: var(--text-dim);
}

.post-list-summary {
  margin: 0.5rem 0 0.75rem;
  color: var(--text-dim);
}

.post-list-summary p {
  margin: 0;
}

.post-list-summary h1,
.post-list-summary h2,
.post-list-summary h3,
.post-list-summary h4,
.post-list-summary h5,
.post-list-summary h6 {
  font-size: 1em;
  font-weight: normal;
  margin: 0 0 0.5rem;
  color: var(--text);
  text-shadow: none;
}

.post-list-more {
  position: relative;
  display: inline-block;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85em;
  font-weight: 600;
  padding: 0.3rem 1rem 0.4rem;
  border-radius: 4px;
  border: 1px solid #0a2233;
  background: var(--button-gloss);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.4);
  transition: filter 0.12s ease, box-shadow 0.12s ease;
}

.post-list-more:hover {
  color: #ffffff;
  background: var(--button-gloss-hover);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 0 12px var(--accent-glow),
    0 2px 6px rgba(0, 0, 0, 0.4);
}

.post-list-more:active {
  filter: brightness(0.92);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45);
}

/* ---------- friends ---------- */

.friends-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.friend-btn {
  display: inline-block;
  line-height: 0;
}

.friend-btn img {
  display: block;
  width: 88px;
  height: 31px;
  object-fit: contain;
}

.friends-empty {
  margin-top: 1rem;
  color: var(--text-dim);
}

/* ---------- code blocks ---------- */

.highlight,
.highlight pre,
.highlight code {
  font-family: 'JetBrains Mono', ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, monospace;
}

.highlight pre {
  padding: 1rem 1.25rem;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(165, 212, 250, 0.22);
  /* chroma emits dracula's background inline on <pre>; !important wins for the glass fill */
  background: rgba(10, 20, 34, 0.72) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

/* ---------- small screens & fallbacks ---------- */

@media (max-width: 640px) {
  .page { padding: 0.75rem 0.75rem 0; }
  .content { --pad-x: 1.25rem; margin-top: 1.25rem; padding: 1.25rem; }
  /* stacked, in-flow header on small screens (no hanging/corner overlap) */
  .header_image {
    position: static;
    transform: none;
    margin: 0 auto 0.75rem;
    background-position: center;
    width: 240px;
    height: 46px;
  }
  .site-nav {
    position: static;
    transform: none;
    right: auto;
    justify-content: center;
    width: fit-content;
    margin: 0 auto 1.25rem;
  }
  .post-list-item { flex-direction: column; }
  .post-list-thumb { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .home-hero-bio > p:not(:first-child) { flex: 1 1 100%; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .content,
  .site-footer { background: rgba(13, 26, 40, 0.92); }
}

@media (prefers-reduced-transparency: reduce) {
  .content,
  .site-footer,
  .home-now,
  .home-contact,
  .home-hero-bio {
    background: rgb(16, 30, 46);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
