/* ============================================================
   xvlr — shared site styles
   navy / glass / SF Pro — matches the homepage
   ============================================================ */

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

:root {
  --bg: hsl(201, 100%, 13%);
  --fg: hsl(0, 0%, 100%);
  --muted: hsl(240, 4%, 66%);
  --accent: hsl(190, 78%, 72%);
  --accent-2: hsl(48, 90%, 72%);
  --glass: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.12);
  --font-display: -apple-system, 'SF Pro Display', 'SF Pro Text', BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --font-body: -apple-system, 'SF Pro Text', BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --maxw: 1100px;
}

@keyframes fade-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in   { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin      { to { transform: rotate(360deg); } }
@keyframes hop       { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes float-y   { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

html { scroll-behavior: smooth; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── SCROLL PROGRESS ─── */
#progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%; z-index: 200;
  background: linear-gradient(90deg, var(--accent), #fff);
  box-shadow: 0 0 10px rgba(120,220,255,0.5);
}

/* ─── VIDEO BG ─── */
.video-bg { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: 0; transition: opacity 1.2s ease; }
.video-bg.loaded { opacity: 1; }
.video-overlay {
  position: fixed; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,20,35,0.74) 0%, rgba(0,20,35,0.60) 40%, rgba(0,20,35,0.82) 100%);
}

/* ─── NAV (floating frosted pill) ─── */
nav {
  position: sticky; top: 14px; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 16px 13px 24px; max-width: 1180px; margin: 14px auto 0;
  border-radius: 100px; border: 1px solid transparent;
  transition: background .45s ease, border-color .45s ease, box-shadow .45s ease, padding .3s ease;
  animation: fade-in 1s ease 0.1s both;
}
nav.scrolled {
  background: rgba(8,28,42,0.55);
  border-color: var(--glass-border);
  box-shadow: 0 12px 44px rgba(0,0,0,0.28);
  -webkit-backdrop-filter: blur(16px) saturate(1.1); backdrop-filter: blur(16px) saturate(1.1);
}
.nav-logo { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.02em; color: var(--fg); text-decoration: none; flex-shrink: 0; }
.nav-logo sup { font-size: 0.55em; vertical-align: super; opacity: 0.7; display: inline-block; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.nav-logo:hover sup { transform: rotate(180deg); }
.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; flex-wrap: wrap; justify-content: center; }
.nav-links a { position: relative; font-size: 0.8125rem; font-weight: 400; color: var(--muted); text-decoration: none; letter-spacing: 0.02em; transition: color 0.25s; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 100%; height: 1px; background: var(--fg); transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.16,1,.3,1); }
.nav-links a:hover, .nav-links a.active { color: var(--fg); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-cta {
  font-family: var(--font-body); font-size: 0.8125rem; font-weight: 400; color: var(--fg);
  background: var(--glass); border: 1px solid var(--glass-border); cursor: pointer; flex-shrink: 0;
  padding: 10px 22px; border-radius: 100px; transition: transform 0.2s, background 0.25s, box-shadow 0.25s; text-decoration: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.nav-cta:hover { transform: scale(1.04); background: rgba(255,255,255,0.14); box-shadow: 0 0 22px rgba(120,220,255,0.25); }

/* mobile hamburger (injected by site.js) */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; color: var(--fg); flex-shrink: 0; }
.menu-toggle svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.7; fill: none; display: block; }
.nav-links .nav-mobile-extra { display: none; }

/* ─── PAGE HERO ─── */
.page-hero {
  position: relative; z-index: 10; text-align: center;
  max-width: 820px; margin: 0 auto;
  padding: clamp(52px, 11vh, 120px) 24px clamp(28px, 5vh, 52px);
}
.crumb { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; animation: fade-rise .8s ease .15s both; }
.crumb a { color: var(--muted); text-decoration: none; transition: color .2s; }
.crumb a:hover { color: var(--fg); }
.crumb .sep { opacity: 0.4; margin: 0 8px; }
.page-hero h1 {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05;
  font-size: clamp(2.4rem, 7vw, 4.5rem); color: var(--fg);
  animation: fade-rise .8s ease .3s both;
}
.page-hero .tag { font-size: 1.05rem; color: var(--muted); margin-top: 18px; line-height: 1.6; max-width: 560px; margin-left: auto; margin-right: auto; animation: fade-rise .8s ease .45s both; }

/* ─── SECTION ─── */
.sec { position: relative; z-index: 10; max-width: var(--maxw); margin: 0 auto; padding: clamp(40px,7vh,80px) 48px; }
.sec.narrow { max-width: 760px; }
.sec-label { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.08); }

/* ─── DIVIDER ─── */
.section-divider { position: relative; z-index: 10; max-width: var(--maxw); margin: 0 auto; padding: 0 48px; display: flex; align-items: center; gap: 20px; }
.divider-line { flex: 1; height: 1px; background: rgba(255,255,255,0.12); }
.divider-label { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

/* ─── CARDS GRID (hub / generic) ─── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  min-height: 168px; padding: 26px 24px; border-radius: 18px; text-decoration: none; color: var(--fg);
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.10); overflow: hidden;
  transition: background .3s, border-color .3s, transform .3s;
}
.card:hover { background: var(--glass); border-color: var(--glass-border); transform: translateY(-5px); }
.card .card-n { font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.card .card-t { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.card .card-d { font-size: 0.86rem; color: var(--muted); line-height: 1.5; margin-top: 8px; }
.card .card-arrow { position: absolute; top: 24px; right: 24px; color: rgba(255,255,255,0.4); opacity: 0; transform: translate(-6px,6px); transition: all .3s; }
.card:hover .card-arrow { opacity: 1; transform: translate(0,0); color: var(--accent); }
.card .card-arrow svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.card .emoji { font-size: 1.6rem; line-height: 1; filter: saturate(1.1); }

/* ─── PROSE (about / long text) ─── */
.prose { font-size: 1.06rem; line-height: 1.85; color: rgba(255,255,255,0.82); }
.prose p { margin-bottom: 1.3em; }
.prose p:first-of-type { font-size: 1.18rem; color: var(--fg); }
.prose a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(120,220,255,0.3); }
.prose a:hover { border-color: var(--accent); }
.prose .drop::first-letter { font-family: var(--font-display); font-size: 3.2em; font-weight: 600; float: left; line-height: 0.8; padding: 6px 12px 0 0; color: var(--accent); }

/* ─── TIMELINE (updates) ─── */
.year-block { margin-bottom: 56px; }
.year-label { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.3); margin-bottom: 10px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.tl-item { display: grid; grid-template-columns: 96px 1fr; gap: 22px; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.06); align-items: start; transition: padding-left .25s; }
.tl-item:hover { padding-left: 10px; }
.tl-date { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.04em; color: var(--accent); font-variant-numeric: tabular-nums; padding-top: 2px; }
.tl-text { font-size: 1rem; line-height: 1.6; color: rgba(255,255,255,0.84); }

/* ─── NOTE CARDS ─── */
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.note-card {
  padding: 26px 24px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 14px 34px rgba(0,0,0,0.22);
  border-left: 2px solid var(--accent);
}
.note-card:nth-child(3n+2) { border-left-color: var(--accent-2); }
.note-card:nth-child(3n+3) { border-left-color: hsl(330,70%,74%); }
.note-card .note-date { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.note-card p { font-size: 0.97rem; line-height: 1.65; color: rgba(255,255,255,0.85); }

/* ─── POST LIST (blog/random) ─── */
.post-item { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; text-decoration: none; color: var(--fg); border-bottom: 1px solid rgba(255,255,255,0.06); gap: 20px; position: relative; transition: padding .3s ease; }
.post-item:last-child { border-bottom: none; }
.post-item:hover { padding-left: 12px; }
.post-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.post-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.25); flex-shrink: 0; transition: all 0.25s; }
.post-item:hover .post-dot { background: var(--accent); transform: scale(1.6); }
.post-title { font-size: 16px; letter-spacing: -0.01em; color: rgba(255,255,255,0.82); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.25s; }
.post-item:hover .post-title { color: #fff; }
.post-right { display: flex; align-items: center; gap: 18px; flex-shrink: 0; position: relative; padding-right: 22px; }
.post-date { font-size: 0.75rem; color: rgba(255,255,255,0.3); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.post-arrow { position: absolute; right: 0; top: 50%; opacity: 0; transform: translateX(-6px) translateY(-50%); transition: all 0.25s; color: rgba(255,255,255,0.5); }
.post-item:hover .post-arrow { opacity: 1; transform: translateX(0) translateY(-50%); }
.post-arrow svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 1.5; fill: none; }

/* ─── GALLERY ─── */
.gal { columns: 3; column-gap: 14px; }
.gal figure { break-inside: avoid; margin-bottom: 14px; position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--glass-border); }
.gal img { width: 100%; display: block; transition: transform .5s cubic-bezier(.16,1,.3,1), filter .4s; filter: saturate(0.95); }
.gal figure:hover img { transform: scale(1.05); filter: saturate(1.1); }
.gal figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px; font-size: 0.78rem; letter-spacing: 0.02em; color: #fff;
  background: linear-gradient(transparent, rgba(0,15,28,0.85)); opacity: 0; transform: translateY(8px); transition: all .35s; }
.gal figure:hover figcaption { opacity: 1; transform: translateY(0); }

/* ─── STATS (insights) ─── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat-box { padding: 28px 24px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-border); text-align: center; }
.stat-num { font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; letter-spacing: -0.03em; color: var(--fg); line-height: 1; }
.stat-num .unit { font-size: 1rem; color: var(--accent); margin-left: 2px; }
.stat-lab { font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 12px; }
.fun-list { list-style: none; }
.fun-list li { display: flex; gap: 14px; padding: 16px 2px; border-bottom: 1px solid rgba(255,255,255,0.07); font-size: 1rem; color: rgba(255,255,255,0.84); align-items: baseline; }
.fun-list li .bullet { color: var(--accent); flex-shrink: 0; }

/* ─── SUBSCRIBE FORM ─── */
.panel { max-width: 560px; margin: 0 auto; padding: 56px 40px; border-radius: 24px; text-align: center;
  background: var(--glass); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.subform { display: flex; gap: 8px; max-width: 460px; margin: 26px auto 0; }
.subform input { flex: 1; min-width: 0; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); border-radius: 100px; padding: 15px 22px; color: var(--fg); font-family: var(--font-body); font-size: 0.9rem; outline: none; transition: border-color .25s, box-shadow .25s; }
.subform input::placeholder { color: rgba(255,255,255,0.4); }
.subform input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(120,220,255,0.12); }
.subform button { background: var(--fg); color: var(--bg); font-family: var(--font-body); font-weight: 500; font-size: 0.9rem; padding: 0 30px; border: none; border-radius: 100px; cursor: pointer; transition: transform .2s, opacity 0.2s; white-space: nowrap; }
.subform button:hover { opacity: 0.9; transform: scale(1.03); }

/* ─── CONTACT ─── */
.contact-big { font-family: var(--font-display); font-size: clamp(1.4rem, 5vw, 2.8rem); font-weight: 500; letter-spacing: -0.02em; color: var(--accent); text-decoration: none; border-bottom: 2px solid transparent; transition: border-color .2s; }
.contact-big:hover { border-color: var(--accent); }
.chips { display: flex; gap: 12px; flex-wrap: wrap; }
.chip { font-size: 0.82rem; color: var(--fg); text-decoration: none; border: 1px solid var(--glass-border); background: var(--glass); padding: 11px 22px; border-radius: 100px; transition: background .2s, transform .2s; }
.chip:hover { background: rgba(255,255,255,0.13); transform: translateY(-2px); }

/* ─── FOOTER ─── */
footer { position: relative; z-index: 10; border-top: 1px solid rgba(255,255,255,0.07); margin-top: 40px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 40px 48px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-brand { font-size: 0.9375rem; font-weight: 500; color: rgba(255,255,255,0.4); text-decoration: none; letter-spacing: -0.02em; }
.footer-links { display: flex; gap: 24px; list-style: none; flex-wrap: wrap; }
.footer-links a { font-size: 0.8rem; color: rgba(255,255,255,0.3); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: rgba(255,255,255,0.75); }
.footer-copy { font-size: 0.75rem; color: rgba(255,255,255,0.2); }

/* ─── REVEAL ─── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.section-divider.reveal .divider-line { transform: scaleX(0); transition: transform .9s cubic-bezier(.16,1,.3,1) .1s; }
.section-divider.reveal.in .divider-line { transform: scaleX(1); }

/* ─── CONFETTI ─── */
.confetti { position: fixed; width: 9px; height: 9px; z-index: 300; pointer-events: none; border-radius: 1px; will-change: transform, opacity; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  nav { top: 10px; padding: 11px 14px 11px 18px; margin: 10px 12px 0; max-width: none; }
  .nav-cta { display: none; }
  .menu-toggle { display: block; }
  .nav-links {
    position: absolute; top: calc(100% + 10px); left: 12px; right: 12px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(8,28,42,0.92); border: 1px solid var(--glass-border); border-radius: 18px;
    padding: 12px 16px; box-shadow: 0 18px 50px rgba(0,0,0,0.4);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s, visibility .25s;
  }
  nav.open .nav-links { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-links a { font-size: 0.95rem; padding: 11px 4px; width: 100%; }
  .nav-links a::after { display: none; }
  .nav-links .nav-mobile-extra { display: block; border-top: 1px solid var(--glass-border); margin-top: 6px; padding-top: 14px; color: var(--accent); }
  .sec { padding: 48px 22px; }
  .section-divider { padding: 0 22px; }
  .gal { columns: 2; }
  .subform { flex-direction: column; }
  .subform button { padding: 14px 30px; }
  .footer-inner { padding: 28px 22px; flex-direction: column; align-items: flex-start; }
  .tl-item { grid-template-columns: 80px 1fr; gap: 14px; }
}
@media (max-width: 460px) { .gal { columns: 1; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
