/* === Castlevania Retro Gothic — Dark, Painterly, Heavier CRT === */
:root {
 /* Fonts */
 --font-title: 'Press Start 2P', system-ui, sans-serif; /* retro headings */
 --font-body: 'VT323', system-ui, sans-serif; /* retro body */
 --font-gothic: 'Cinzel', serif; /* epic gothic titles */
 --font-ornate: 'UnifrakturCook', cursive; /* ornamental accents */
 /* Palette */
 --ink-black: #0a0a0f; /* abyssal black */
 --mid-ink: #121018; /* inky purple-black */
 --deep-red: #b11226; /* blood crimson */
 --shadow-red: #7a0e17; /* deeper crimson */
 --steel-gray: #8a8f9a; /* muted steel gray */
 --fog-gray: #b5b7be; /* lighter muted gray */
 --antique-gold: #c0a060; /* antique gold accents */
 /* Theme tokens */
 --color-bg: var(--ink-black);
 --color-fg: #e6e6ea;
 --color-muted: var(--fog-gray);
 --color-accent: var(--deep-red);
 --color-accent-2: var(--antique-gold);
 --tile-bg: rgba(18,16,24,.92);
 --tile-border: #2e2638;
 --shadow: rgba(0,0,0,.7);
 
  --link: #b11226;          /* blood crimson */
  --link-hover: #d21f3a;    /* brighter crimson on hover */
  --link-visited: #7a0e17;  /* deeper dried-crimson */
  --link-underline: rgba(192,160,96,0.35); /* antique-gold underline hint */

}
/* Light theme (optional) */
html.theme-light {
 --color-bg: #eaf0f6;
 --color-fg: #1a1a1a;
 --color-muted: #5e6670;
 --tile-bg: rgba(255,255,255,.92);
 --tile-border: #c9def6;
 --color-accent: #a10e1f; /* keep red accent even in light mode */
 --color-accent-2: #a0792a;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
 margin: 0;
 background: var(--color-bg);
 color: var(--color-fg);
 font-family: var(--font-body);
 font-size: 20px;
 line-height: 1.5;
}
/* === Painterly Ambient Background (stronger) === */
body::before {
 content: '';
 position: fixed; inset: 0; pointer-events: none; z-index: -2;
 background:
 radial-gradient(1200px 600px at 18% 28%, rgba(177,18,38,.14), transparent 60%),
 radial-gradient(900px 500px at 82% 72%, rgba(192,160,96,.12), transparent 65%),
 conic-gradient(from 190deg at 28% 42%, rgba(255,255,255,.03), rgba(0,0,0,0) 28%, rgba(255,255,255,.02) 45%, rgba(0,0,0,0) 60%),
 conic-gradient(from -40deg at 72% 56%, rgba(255,255,255,.02), rgba(0,0,0,0) 25%, rgba(255,255,255,.02) 40%, rgba(0,0,0,0) 62%),
 linear-gradient(180deg, var(--mid-ink), var(--ink-black));
 filter: saturate(.96) contrast(1.07);
 animation: bgShift 30s linear infinite;
}
/* Vignette */
body::after {
 content: '';
 position: fixed; inset: 0; pointer-events: none; z-index: -1;
 background: radial-gradient(1100px 540px at 50% 50%, transparent 38%, rgba(0,0,0,.38) 72%, rgba(0,0,0,.80) 100%);
}
/* Header */
.site-header { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; gap: 16px; padding: 12px 20px; backdrop-filter: blur(6px) contrast(1.05); background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.15)); border-bottom: 1px solid var(--tile-border); }


/* === Logo: Aristocratic Gothic Sigil (Castlevania-esque) === */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-fg);
}

/* Sigil (diamond) with gilded filigree feel */
.logo-mark {
  width: 30px;
  height: 30px;
  position: relative;
  display: grid;
  place-items: center;
  transform: rotate(45deg);
  border-radius: 6px;
  border: 1px solid rgba(192,160,96,.55);
  background:
    radial-gradient(circle at 30% 28%, rgba(192,160,96,.28), transparent 55%),
    radial-gradient(circle at 70% 72%, rgba(177,18,38,.18), transparent 60%),
    linear-gradient(180deg, rgba(18,16,24,.92), rgba(10,10,15,.96));
  box-shadow:
    0 0 18px rgba(177,18,38,.22),
    0 0 10px rgba(192,160,96,.18),
    inset 0 0 0 1px rgba(0,0,0,.55);
  filter: drop-shadow(0 0 10px rgba(177,18,38,.22));
}

/* Inner frame */
.logo-mark::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 4px;
  border: 1px solid rgba(46,38,56,.95);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35);
}

/* Tiny cross / spear motif */
.logo-mark::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background:
    linear-gradient(90deg, transparent 0 42%, rgba(192,160,96,.9) 42% 58%, transparent 58% 100%),
    linear-gradient(0deg, transparent 0 42%, rgba(192,160,96,.9) 42% 58%, transparent 58% 100%);
  opacity: .85;
  transform: rotate(-45deg); /* cancel the parent rotation */
  filter: drop-shadow(0 0 6px rgba(192,160,96,.35));
}

.logo-monogram {
  position: relative;
  transform: rotate(-45deg);
  font-family: var(--font-ornate);
  font-size: 16px;
  line-height: 1;
  color: rgba(192,160,96,.95);
  text-shadow: 0 0 10px rgba(192,160,96,.28), 0 0 14px rgba(177,18,38,.18);
  z-index: 1;
}

.logo-text {
  font-family: var(--font-gothic);
  letter-spacing: .8px;
  font-size: 18px;
}

/* Hover: candle-flicker shimmer (instead of terminal cursor vibes) */
@keyframes sigilFlicker {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(177,18,38,.20)); }
  45% { filter: drop-shadow(0 0 14px rgba(177,18,38,.28)) drop-shadow(0 0 9px rgba(192,160,96,.20)); }
  60% { filter: drop-shadow(0 0 12px rgba(177,18,38,.18)); }
}

.site-header .logo:hover .logo-mark {
  border-color: rgba(192,160,96,.75);
  box-shadow:
    0 0 22px rgba(177,18,38,.32),
    0 0 14px rgba(192,160,96,.26),
    inset 0 0 0 1px rgba(0,0,0,.55);
  animation: sigilFlicker 2.8s ease-in-out infinite;
}

/* Light theme tweaks for the sigil */
html.theme-light .logo-mark {
  border-color: rgba(179,143,34,.70);
  background:
    radial-gradient(circle at 30% 28%, rgba(212,175,55,.22), transparent 58%),
    radial-gradient(circle at 70% 72%, rgba(122,30,34,.10), transparent 62%),
    linear-gradient(180deg, rgba(255,248,233,.92), rgba(247,241,225,.94));
  box-shadow:
    0 0 18px rgba(212,175,55,.18),
    0 0 10px rgba(122,30,34,.10),
    inset 0 0 0 1px rgba(87,66,38,.18);
}
html.theme-light .logo-monogram {
  color: rgba(179,143,34,.95);
  text-shadow: 0 0 10px rgba(212,175,55,.25);
}

@media (prefers-reduced-motion: reduce) {
  .site-header .logo:hover .logo-mark { animation: none !important; }
}


/* Softer ember glint (use for small decorative glyphs if needed) */
.blink {
  display: inline-block;
  color: var(--color-accent-2);
  text-shadow: 0 0 8px rgba(192,160,96,.35);
  animation: ember 3.2s ease-in-out infinite;
}
@keyframes ember {
  0%, 100% { opacity: .25; transform: translateY(0); }
  50% { opacity: .95; transform: translateY(-1px); }
}

.site-nav ul { display:flex; flex-wrap:wrap; gap:10px; list-style:none; margin:0; padding:0; }
.site-nav a { font-family: var(--font-body); text-decoration:none; color: var(--color-fg); padding:8px 12px; border:1px solid var(--tile-border); border-radius:8px; background: var(--tile-bg); transition: transform .15s ease, box-shadow .15s ease, color .2s ease; }
.site-nav a:hover { transform: translateY(-2px); box-shadow: 0 6px 16px var(--shadow); color: var(--color-accent); }
.theme-toggle { border:1px solid var(--tile-border); background: var(--tile-bg); color: var(--color-fg); padding:8px 10px; border-radius:8px; cursor:pointer; }
.page { max-width: 1100px; margin: 40px auto; padding: 0 20px; }
.page-section { margin: 48px 0; position: relative; }
.section-title { font-family: var(--font-gothic); font-size: 32px; letter-spacing: .5px; margin: 0 0 16px; text-shadow: 0 0 3px rgba(0,0,0,.7), 0 0 12px rgba(177,18,38,.32); }
/* === Hero (deeper, painterly, CRT) === */
.hero { position:relative; padding:64px 20px; text-align:center; border:2px solid var(--tile-border); border-radius:16px; background: linear-gradient(180deg, #1c1526, var(--ink-black)); box-shadow: 0 0 24px rgba(177,18,38,.28), inset 0 0 28px rgba(177,18,38,.18); overflow:hidden; }
.hero-title { font-family: var(--font-gothic); font-size: 36px; margin: 0 0 10px; }
.hero-sub { color: var(--color-muted); margin: 0 0 20px; }
.accent { color: var(--color-accent); text-shadow: 0 0 12px rgba(177,18,38,.45); }
/* Stronger CRT effects */
.crt-overlay { position:absolute; inset:0; pointer-events:none; z-index:0; background:
 /* horizontal scanlines */
 repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0px, rgba(255,255,255,0.025) 2px, rgba(0,0,0,0) 2px, rgba(0,0,0,0) 4px),
 /* vertical grille */
 repeating-linear-gradient(90deg, rgba(255,255,255,0.015) 0px, rgba(255,255,255,0.015) 1px, rgba(0,0,0,0) 1px, rgba(0,0,0,0) 3px);
 mix-blend-mode: overlay;
 filter: contrast(1.06) saturate(1.1);
}
/* chromatic aberration glow */
.crt-chroma { position:absolute; inset:-2%; pointer-events:none; z-index:0; background:
 linear-gradient(90deg, rgba(255,0,0,.06), rgba(0,255,255,.06));
 mix-blend-mode: screen; filter: blur(0.8px);
}
/* painterly surface texture */
.texture { position:absolute; inset:0; pointer-events:none; z-index:0; background:
 /* rough paper grain via conic gradients */
 conic-gradient(from 210deg at 20% 30%, rgba(255,255,255,.02), rgba(0,0,0,0) 30%),
 conic-gradient(from 20deg at 80% 60%, rgba(255,255,255,.018), rgba(0,0,0,0) 32%),
 radial-gradient(600px 260px at 70% 40%, rgba(255,255,255,.02), transparent 70%);
 opacity:.9; mix-blend-mode: overlay;
}
/* fog & stars */
.stars { position:absolute; inset:0; z-index:0; }
.stars::before { content:''; position:absolute; inset:0; background-image: radial-gradient(circle, rgba(255,255,255,.8) .5px, transparent 1px); background-size: 9px 9px; opacity: .14; filter: drop-shadow(0 0 2px rgba(192,160,96,.28)); mask-image: radial-gradient(circle at 50% 50%, transparent 34%, black 74%); animation: twinkle 12s ease-in-out infinite; }
.fog { position:absolute; inset:0; z-index:0; background: radial-gradient(800px 300px at 18% 80%, rgba(255,255,255,.035), transparent 60%), radial-gradient(600px 240px at 84% 30%, rgba(255,255,255,.045), transparent 65%); filter: blur(5px); }
/* RGB split for titles (retro CRT) */
.rgb-split { text-shadow: 1px 0 rgba(255,0,0,.35), -1px 0 rgba(0,255,255,.35), 0 1px rgba(0,0,0,.25); }
/* Pixel frame + corners */
.pixel-frame { position:relative; border:2px solid var(--tile-border); box-shadow: 0 4px 0 #0003, inset 0 0 0 2px #0001; }
.corner { position:absolute; width:22px; height:22px; background: conic-gradient(from 90deg, rgba(192,160,96,.38), rgba(177,18,38,.36) 33%, rgba(0,0,0,0) 34%); opacity:.6; }
.corner.tl { top:10px; left:10px; transform: rotate(0deg); }
.corner.tr { top:10px; right:10px; transform: rotate(90deg); }
.corner.bl { bottom:10px; left:10px; transform: rotate(-90deg); }
.corner.br { bottom:10px; right:10px; transform: rotate(180deg); }
/* Tiles */
.tiles-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap:16px; }
.tile { display:block; text-decoration:none; color: var(--color-fg); background: var(--tile-bg); border:2px solid var(--tile-border); border-radius:14px; overflow:hidden; position:relative; transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 10px 24px var(--shadow), 0 0 12px rgba(177,18,38,.38); border-color: var(--color-accent); }
.thumb { aspect-ratio: 16/9; overflow:hidden; background: repeating-conic-gradient(from 45deg, #0a0a12 0% 25%, #0b0b14 0 50%); display: flex; align-items: center; justify-content:center; }
.thumb img{ width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.tile-body { padding:12px; }
.tile-body h3 { font-family: var(--font-title); font-size: 16px; margin: 0 0 6px; }
.tile-body p { margin: 0 0 8px; color: var(--color-muted); }
.badges { display:flex; flex-wrap:wrap; gap:6px; }
.badge { font-size:14px; padding:2px 8px; border-radius:8px; border:1px solid var(--tile-border); background: rgba(0,0,0,0.28); }
.filter-bar { display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 16px; }
.chip { font-family: var(--font-body); padding:8px 10px; border-radius:999px; border:1px solid var(--tile-border); background: var(--tile-bg); color: var(--color-fg); cursor:pointer; }
.chip.active { border-color: var(--color-accent); color: var(--color-accent); box-shadow: 0 0 12px rgba(177,18,38,.38), 0 0 24px rgba(192,160,96,.30); }
/* Avatar */
.avatar { width:320px; height:320px; border-radius:8px; border:2px solid var(--tile-border); background:#0a0a12; box-shadow: 0 0 16px rgba(177,18,38,.38), inset 0 0 22px rgba(177,18,38,.18); filter: contrast(1.04) saturate(1.05); }
.avatar-wrap { display:flex; justify-content:center; }
.bio { max-width:780px; margin:16px auto 0; }
/* Timeline (Work Experience) */
.timeline { position: relative; margin: 24px 0; padding-left: 18px; }
.t-item { position: relative; margin: 22px 0; }
.t-line { position:absolute; left:0; top:0; bottom:0; width:2px; background: linear-gradient(to bottom, rgba(192,160,96,.5), rgba(177,18,38,.5)); box-shadow: 0 0 6px rgba(177,18,38,.35); }
.t-card { position:relative; padding:14px; border-radius:14px; background: var(--tile-bg); border:2px solid var(--tile-border); box-shadow: 0 0 0 1px rgba(177,18,38,.22); }
.t-head { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.t-role { font-family: var(--font-title); font-size: 16px; }
.t-meta { font-family: var(--font-body); font-size: 16px; color: var(--color-muted); }
.t-org { margin-right: 8px; }
.t-dates { opacity: .9; }
.t-desc { margin: 8px 0 0; color: var(--color-muted); }
.tag { display:inline-block; font-family: var(--font-body); font-size: 14px; padding:2px 8px; margin-left: 6px; border-radius:8px; border:1px solid var(--tile-border); background: rgba(0,0,0,.22); }
.small { font-size: 16px; }
/* Footer */
.site-footer { margin-top:40px; padding:20px; text-align:center; border-top:1px solid var(--tile-border); color: var(--color-muted); }
.site-footer .retro { color: var(--color-accent-2); text-shadow: 0 0 8px rgba(192,160,96,.45); }
/* Animations */
@keyframes bgShift { 0% { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; } 50% { background-position: 40px -30px, -50px 40px, 25px 15px, -30px 20px, 0 0; } 100% { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; } }
@keyframes twinkle { 0%, 100% { opacity: .10; } 45% { opacity: .18; } 60% { opacity: .12; } }
/* Responsive */
@media (max-width:820px){ .site-nav ul{flex-direction:column;} .t-head{flex-direction:column; align-items:flex-start;} html.theme-dark .castle-bg{background-position: 180% 18%;} }
/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
 body::before, .stars::before { animation: none !important; }
}


/* === Light Theme: Golden Parchment · Illuminated Manuscript === */
html.theme-light {
  /* Warm parchment palette */
  --paper-cream: #f7f1e1;      /* base parchment */
  --paper-tan:   #ead9b0;      /* mid tones */
  --paper-sepia: #e0cfa3;      /* borders / deckle */
  --ink-brown:   #2c2416;      /* readable text */
  --maroon-ink:  #7a1e22;      /* accent red-brown */
  --gold-foil:   #d4af37;      /* luminous gold */
  --gold-deep:   #b38f22;      /* deeper gold */

  /* Theme tokens override */
  --color-bg: var(--paper-cream);
  --color-fg: var(--ink-brown);
  --color-muted: #6b5a3e;
  --tile-bg: rgba(255,252,245,.92);
  --tile-border: var(--paper-sepia);
  --color-accent: var(--maroon-ink); /* keep gothic red accent */
  --color-accent-2: var(--gold-foil);
  --shadow: rgba(87,66,38,.25);
}

/* Parchment ambient background */
html.theme-light body::before {
  background:
    radial-gradient(1200px 600px at 18% 28%, rgba(212,175,55,.08), transparent 60%),
    radial-gradient(900px 500px at 82% 72%, rgba(122,30,34,.06), transparent 65%),
    conic-gradient(from 220deg at 25% 35%, rgba(0,0,0,.04), rgba(0,0,0,0) 28%, rgba(0,0,0,.03) 45%, rgba(0,0,0,0) 60%),
    conic-gradient(from -30deg at 75% 60%, rgba(0,0,0,.03), rgba(0,0,0,0) 25%, rgba(0,0,0,.03) 40%, rgba(0,0,0,0) 62%),
    linear-gradient(180deg, #f3e8cc, var(--paper-cream));
  filter: saturate(.98) contrast(1.02);
}
/* Burnished deckle vignette */
html.theme-light body::after {
  background: radial-gradient(1100px 540px at 50% 50%, transparent 40%, rgba(179,143,34,.25) 78%, rgba(122,30,34,.20) 100%);
}

/* Header on parchment */
html.theme-light .site-header {
  background: linear-gradient(180deg, rgba(255,245,220,.85), rgba(255,252,245,.55));
  border-bottom: 1px solid var(--paper-sepia);
  backdrop-filter: blur(4px) sepia(.08);
}
html.theme-light html.theme-light .site-nav a {
  background: linear-gradient(180deg, rgba(255,252,245,.92), rgba(255,248,233,.84));
  border-color: var(--paper-sepia);
}
html.theme-light .site-nav a:hover {
  color: var(--color-accent-2);
  box-shadow: 0 6px 16px rgba(87,66,38,.25), 0 0 8px rgba(212,175,55,.35);
  transform: translateY(-2px);
}
html.theme-light .theme-toggle {
  background: linear-gradient(180deg, rgba(255,252,245,.92), rgba(255,248,233,.84));
  border-color: var(--paper-sepia);
}

/* Hero: Illuminated manuscript frame */
html.theme-light .hero {
  background:
    linear-gradient(180deg, #fff8e9, #f7f1e1);
  border: 2px solid var(--gold-deep);
  box-shadow: 0 0 22px rgba(212,175,55,.25), inset 0 0 24px rgba(179,143,34,.18);
}
html.theme-light .crt-overlay {
  opacity: .04; mix-blend-mode: multiply; filter: contrast(1.02) saturate(1.02);
}
html.theme-light .crt-chroma { opacity: .03; filter: blur(.6px); }
html.theme-light .texture {
  background:
    conic-gradient(from 210deg at 20% 30%, rgba(0,0,0,.04), rgba(0,0,0,0) 32%),
    conic-gradient(from 20deg at 80% 60%, rgba(0,0,0,.035), rgba(0,0,0,0) 34%),
    radial-gradient(600px 260px at 70% 40%, rgba(0,0,0,.035), transparent 70%);
  opacity:.9; mix-blend-mode: multiply;
}
html.theme-light .stars::before {
  background-image: radial-gradient(circle, rgba(212,175,55,.85) .6px, transparent 1.2px);
  opacity: .18; filter: drop-shadow(0 0 1px rgba(212,175,55,.35));
}
html.theme-light .accent { color: var(--color-accent-2); text-shadow: 0 0 10px rgba(212,175,55,.45); }
html.theme-light .rgb-split { text-shadow: 1px 0 rgba(212,175,55,.35), -1px 0 rgba(122,30,34,.30), 0 1px rgba(0,0,0,.10); }

/* Pixel frame corners → gold leaf */
html.theme-light .pixel-frame { box-shadow: 0 4px 0 #0002, inset 0 0 0 2px rgba(179,143,34,.10); }
html.theme-light .corner {
  background: conic-gradient(from 90deg, rgba(212,175,55,.65), rgba(179,143,34,.55) 33%, rgba(0,0,0,0) 34%);
  opacity:.8;
}

/* Illuminated headings */
html.theme-light .section-title {
  color: var(--ink-brown);
  text-shadow: 0 0 3px rgba(212,175,55,.35), 0 0 12px rgba(212,175,55,.25);
}
/* Decorative divider */
html.theme-light .page-section::before {
  content:''; position:absolute; left:0; right:0; top:-10px; height:12px;
  background:
    radial-gradient(8px 8px at 0% 50%, rgba(212,175,55,.9), transparent 60%),
    linear-gradient(90deg, rgba(212,175,55,.55), rgba(179,143,34,.35) 50%, rgba(212,175,55,.55));
  opacity:.6;
}

/* Tiles on parchment */
html.theme-light .tile { background: linear-gradient(180deg, rgba(255,252,245,.92), rgba(255,248,233,.88)); border-color: var(--paper-sepia); }
html.theme-light .tile:hover { border-color: var(--color-accent-2); box-shadow: 0 10px 24px rgba(87,66,38,.22), 0 0 14px rgba(212,175,55,.30); }
html.theme-light .badge { background: rgba(255,245,220,.8); border-color: var(--paper-sepia); color: var(--ink-brown); }
html.theme-light .chip { background: linear-gradient(180deg, rgba(255,252,245,.92), rgba(255,248,233,.84)); border-color: var(--paper-sepia); color: var(--ink-brown); }
html.theme-light .chip.active { border-color: var(--color-accent-2); color: var(--color-accent-2); box-shadow: 0 0 12px rgba(212,175,55,.35), 0 0 24px rgba(212,175,55,.25); }

/* Avatar frame */
html.theme-light .avatar { border-color: var(--gold-deep); box-shadow: 0 0 16px rgba(212,175,55,.30), inset 0 0 18px rgba(179,143,34,.12); background:#fff8e9; }

/* Body text + illuminated drop cap */
html.theme-light .bio p:first-of-type::first-letter {
  font-family: var(--font-ornate);
  float:left; font-size: 64px; line-height: 48px; padding: 10px 12px 4px 12px; margin-right: 10px; margin-top: 6px;
  color: var(--ink-brown);
  background: linear-gradient(180deg, rgba(255,248,233,.95), rgba(247,241,225,.9));
  border: 2px solid var(--gold-deep);
  box-shadow: inset 0 0 8px rgba(212,175,55,.20), 0 2px 6px rgba(87,66,38,.20);
  border-radius: 8px;
}

/* Footer */
html.theme-light .site-footer { border-top-color: var(--paper-sepia); color: #6b5a3e; }
html.theme-light .site-footer .retro { color: var(--color-accent-2); text-shadow: 0 0 8px rgba(212,175,55,.35); }




/* ==========================================
   Pure Gothic Aristocrat Header/Nav (Compact)
   Paste at the END of your CSS
   ========================================== */

/* Keep header strictly one line and slimmer */
.site-header{
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  padding: 6px 12px; /* slimmer header */
}

/* Let nav shrink instead of forcing wrap */
.site-nav{
  flex: 1 1 auto;
  min-width: 0; /* important so overflow works */
}

/* One-line nav that stays horizontal */
.site-nav ul{
  display: flex;
  flex-wrap: nowrap;      /* DO NOT wrap */
  align-items: center;
  gap: 0;                 /* we'll use separators instead */
  margin: 0;
  padding: 0;
  list-style: none;

  white-space: nowrap;
  overflow-x: auto;       /* if too many links, scroll horizontally */
  overflow-y: hidden;
  scrollbar-width: none;  /* Firefox hide scrollbar */
}
.site-nav ul::-webkit-scrollbar{ display:none; } /* Chrome/Safari hide scrollbar */

/* Gold bullet separators like your old look */
.site-nav li{
  display: inline-flex;
  align-items: center;
}
.site-nav li + li::before{
  content: "•";
  color: rgba(192,160,96,.75);  /* antique gold */
  margin: 0 8px;
  transform: translateY(-1px);
  text-shadow: 0 0 8px rgba(192,160,96,.20);
}

/* Links: NOT buttons (no fat backgrounds) */
.site-nav a{
  font-family: var(--font-gothic);
  font-weight: 700;
  font-size: 13px;            /* compact */
  line-height: 1;
  letter-spacing: .7px;
  font-variant: small-caps;   /* aristocratic */
  text-decoration: none;

  padding: 2px 2px;           /* tiny click padding without bulk */
  border: none;
  background: transparent;
  border-bottom: 1px solid transparent;

  color: rgba(230,230,234,.92);
  opacity: .92;

  transition: color .18s ease, border-color .18s ease, text-shadow .18s ease, opacity .18s ease;
}

/* Refined hover: gilded underline + faint crimson bloom */
.site-nav a:hover{
  color: rgba(192,160,96,.95);
  border-bottom-color: rgba(192,160,96,.70);
  text-shadow:
    0 0 10px rgba(192,160,96,.18),
    0 0 12px rgba(177,18,38,.10);
  opacity: 1;
}

/* Active page hint (optional): add class=\"active\" to current link */
.site-nav a.active{
  color: rgba(192,160,96,.98);
  border-bottom-color: rgba(192,160,96,.85);
  text-shadow: 0 0 12px rgba(192,160,96,.22);
  opacity: 1;
}

/* Theme toggle: slim and consistent (no chunky tile look) */
.theme-toggle{
  padding: 4px 8px;
  border-radius: 10px;
  line-height: 1;
  border: 1px solid rgba(46,38,56,.85);
  background: linear-gradient(180deg, rgba(18,16,24,.55), rgba(10,10,15,.45));
  box-shadow: 0 3px 10px rgba(0,0,0,.35);
}

/* Optional: slightly reduce logo text size to match the slimmer header */
.logo-text{
  font-size: 17px;
}

/* Light theme: ink + gold, same refined style */
html.theme-light .site-nav a{
  color: rgba(44,36,22,.86);
  opacity: .92;
}
html.theme-light .site-nav li + li::before{
  color: rgba(179,143,34,.72);
  text-shadow: 0 0 8px rgba(212,175,55,.16);
}
html.theme-light .site-nav a:hover{
  color: rgba(179,143,34,.95);
  border-bottom-color: rgba(179,143,34,.70);
  text-shadow: 0 0 10px rgba(212,175,55,.18);
  opacity: 1;
}

/* Ensure we DO NOT switch to vertical nav on mobile */
@media (max-width: 820px){
  .site-nav ul{
    flex-direction: row;
    flex-wrap: nowrap;
  }
}

/* Dark mode only castle layer */
.castle-bg { display: none; }

html.theme-dark .castle-bg{
  display: block;
  position: fixed;
  inset: 0;
  pointer-events: none;

  /* ✅ IMPORTANT: keep it ABOVE body backgrounds */
  z-index: 0;

  /* ✅ IMPORTANT: path relative to assets/css/styles.css */
  background-image: url("../img/castle-moon.png");
  background-repeat: no-repeat;
  background-position: 150% 18%;
  background-size: min(1180px, 82vw);

  opacity: 0.20;
  filter: saturate(0.92) contrast(1.08) brightness(0.92);

  /* Mask needs webkit prefix too (Safari) */
  -webkit-mask-image: radial-gradient(circle at 180% 18%,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,0.90) 38%,
    rgba(0,0,0,0.35) 62%,
    rgba(0,0,0,0) 80%);
  mask-image: radial-gradient(circle at 180% 18%,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,0.90) 38%,
    rgba(0,0,0,0.35) 62%,
    rgba(0,0,0,0) 80%);
}

/* Ensure your actual site content stays above the castle */
.site-header,
.page,
.site-footer{
  position: relative;
  z-index: 1;
}


/* Remove stars layer everywhere */
.stars,
.stars::before {
  display: none !important;
}

/* Dark mode: make the hero panel slightly transparent */

/* Dark mode: hero panel more transparent */

/* Dark mode: hero panel → more transparent + glassy */
html.theme-dark .hero {
  /* More transparency */
  background: linear-gradient(
    180deg,
    rgba(28, 21, 38, 0.34),
    rgba(10, 10, 15, 0.28)
  );

  /* Refined “glass edge” + subtle inner highlights */
  border-color: rgba(192, 160, 96, 0.22);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(177, 18, 38, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}


/* ==========================================
   Site-wide hyperlink styling (crimson)
   Paste at END of CSS
   ========================================== */

/* Default links (exclude nav + button-like links) */
a:where(:not(.btn):not(.chip):not(.theme-toggle)):not(.site-nav a){
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;

  transition: color .16s ease, text-decoration-color .16s ease, text-shadow .16s ease;
}

/* Hover: slightly brighter crimson + subtle glow */
a:where(:not(.btn):not(.chip):not(.theme-toggle)):not(.site-nav a):hover{
  color: var(--link-hover);
  text-decoration-color: rgba(192,160,96,0.55);
  text-shadow: 0 0 10px rgba(177,18,38,0.22);
}

/* Visited: deeper, more muted crimson */
a:where(:not(.btn):not(.chip):not(.theme-toggle)):not(.site-nav a):visited{
  color: var(--link-visited);
}

/* Keyboard focus: aristocratic “gilded ring” */
a:where(:not(.btn):not(.chip):not(.theme-toggle)):not(.site-nav a):focus-visible{
  outline: 2px solid rgba(192,160,96,0.55);
  outline-offset: 3px;
  border-radius: 6px;
}


/* ==========================================
   Font swap: Aristocratic Gothic (SotN-esque)
   Paste at the END of styles.css
   ========================================== */
:root{
  --font-title: "Cinzel Decorative", "Cinzel", serif;         /* replaces Press Start 2P */
  --font-body: "Cormorant Garamond", "EB Garamond", serif;    /* replaces VT323 */
  --font-gothic: "Cinzel Decorative", "Cinzel", serif;        /* unify headings/logo with the new title face */
}

/* Optional: slightly more “noble manuscript” rhythm */
body{
  font-size: 18px;
  letter-spacing: 0.2px;
}

.section-title,
.hero-title,
.logo-text{
  letter-spacing: 1px;
}


/* ==========================================
   Certificates filters: compact + searchable
   Paste at END of styles.css
   ========================================== */

.filter-bar{
  display: grid;
  gap: 10px;
  margin: 10px 0 18px;
}

.filter-controls{
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-search{
  flex: 1 1 260px;
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--tile-border);
  background: var(--tile-bg);
  color: var(--color-fg);
  outline: none;
}

.filter-search::placeholder{
  color: var(--color-muted);
  opacity: 0.8;
}

.filter-search:focus{
  border-color: var(--color-accent-2);
  box-shadow: 0 0 0 3px rgba(192,160,96,0.18);
}

.filter-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Utility chips (Clear / More) slightly distinct */
.chip--utility{
  font-family: var(--font-gothic);
  font-weight: 700;
  letter-spacing: 0.5px;
  opacity: 0.95;
}

/* Collapsible "More" panel */
.filter-more{
  border: 1px solid var(--tile-border);
  background: var(--tile-bg);
  border-radius: 14px;
  padding: 10px;
}

/* When there are LOTS of tags, keep More panel from becoming huge */
.filter-chips--more{
  max-height: 220px;
  overflow: auto;
  padding-right: 6px;
}

/* Optional: small count bubble on chips */
.chip .chip-count{
  margin-left: 6px;
  font-size: 0.9em;
  opacity: 0.75;
}
