/* ============================================================
   VATUM — style.css
   ============================================================ */

/* ------------------------------------------------------------
   FONTS
   ------------------------------------------------------------ */
@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/SpaceGrotesk-Variable.ttf') format('truetype');
  font-weight: 300 700;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
  font-style: normal;
}


/* ------------------------------------------------------------
   THEME VARIABLES
   ------------------------------------------------------------ */
:root {
  --bg:         #0c0c0c;
  --surface-1:  #111111;
  --surface-2:  #161616;
  --text:       #e2e2e2;
  --text-muted: #666666;
  --accent:     #c4b5fd;  /* lilac / pastel purple */
  --border:     #222222;

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body:    'JetBrains Mono', monospace;
  --font-mono:    'JetBrains Mono', monospace;

  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  2rem;
  --space-xl:  4rem;

  --max-width:     800px;
  --header-height: 60px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:         #f2f2f2;
    --surface-1:  #e8e8e8;
    --surface-2:  #dcdcdc;
    --text:       #111111;
    --text-muted: #888888;
    --accent:     #7c3aed;  /* darker for light mode contrast */
    --border:     #cccccc;
  }
}


/* ------------------------------------------------------------
   RESET
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
ul, ol     { list-style: none; }
a          { color: var(--accent); text-decoration: none; }
button     { cursor: pointer; border: none; background: none; font: inherit; }


/* ------------------------------------------------------------
   AMBIENT MIST BACKGROUND
   border-radius override needed because reset kills it on ::before/::after
   ------------------------------------------------------------ */
body::before,
body::after {
  content: '';
  position: fixed;
  width: 80vw;
  height: 50vh;
  border-radius: 50% !important;  /* override the reset */
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.1;
  animation: mistDrift 28s infinite linear;
}

body::before {
  top: -10%; left: -10%;
  background: var(--accent);
}

body::after {
  bottom: -10%; right: -10%;
  background: var(--text-muted);
  animation-direction: reverse;
  animation-duration: 36s;
}

@keyframes mistDrift {
  0%   { transform: rotate(0deg) translate(5vw, 5vh) scale(1); }
  50%  { transform: rotate(180deg) translate(-5vw, -5vh) scale(1.1); }
  100% { transform: rotate(360deg) translate(5vw, 5vh) scale(1); }
}


/* ------------------------------------------------------------
   V MARK — fixed full-viewport background, all pages
   ------------------------------------------------------------ */
.v-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  color: var(--accent);
  animation: vPulse 5s ease-in-out infinite;
}

.v-bg svg {
  width: 100%;
  height: 100%;
}

@keyframes vPulse {
  0%, 100% {
    filter: drop-shadow(0 0 1px var(--accent))
            drop-shadow(0 0 4px var(--accent));
    opacity: 0.12;
  }
  50% {
    filter: drop-shadow(0 0 3px var(--accent))
            drop-shadow(0 0 12px var(--accent))
            drop-shadow(0 0 24px var(--accent));
    opacity: 0.28;
  }
}


/* ------------------------------------------------------------
   HEADER
   ------------------------------------------------------------ */
.site-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-xl);
  padding: 0 var(--space-lg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-logo a {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}


/* ------------------------------------------------------------
   MAIN / FOOTER
   ------------------------------------------------------------ */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  position: relative;
  z-index: 1;
}

.site-footer {
  padding: var(--space-md) var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.5;
  position: relative;
  z-index: 1;
}

.site-footer a       { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); opacity: 1; }


/* ------------------------------------------------------------
   TYPOGRAPHY
   ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: 2rem;   margin-bottom: var(--space-md); }
h2 { font-size: 1.5rem; margin-bottom: var(--space-md); }
h3 { font-size: 1.2rem; margin-bottom: var(--space-sm); }

p            { margin-bottom: var(--space-md); color: var(--text); }
p:last-child { margin-bottom: 0; }
strong       { font-weight: 600; }

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-2);
  padding: 0.1em 0.4em;
}

pre {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  background: var(--surface-1);
  border-left: 1px solid var(--accent);
  padding: var(--space-md);
  overflow-x: auto;
  margin-bottom: var(--space-md);
}

pre code { background: none; padding: 0; }

blockquote {
  border-left: 1px solid var(--accent);
  padding-left: var(--space-md);
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: var(--space-md);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-lg) 0;
}


/* ------------------------------------------------------------
   CARDS — geometric corner brackets
   ------------------------------------------------------------ */
.card {
  background: transparent;
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-sm);
  position: relative;
  transition: background 0.2s;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 10px; height: 10px;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  transition: border-color 0.2s, width 0.2s, height 0.2s;
}

.card::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 10px; height: 10px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transition: border-color 0.2s, width 0.2s, height 0.2s;
}

.card:hover::before,
.card:hover::after {
  border-color: var(--accent);
  width: 16px;
  height: 16px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: var(--space-sm);
  color: var(--text);
  transition: color 0.2s;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-wrap: wrap;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.05em 0.45em;
  text-transform: lowercase;
  opacity: 0.7;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}


/* ------------------------------------------------------------
   PAGE HEADER
   ------------------------------------------------------------ */
.page-header {
  margin-bottom: var(--space-xl);
}

.page-header h1 { font-size: 2.2rem; }

.page-header h1::after {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--accent);
  margin-top: var(--space-sm);
}

.page-header p {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-top: var(--space-xs);
}


/* ------------------------------------------------------------
   HOME PAGE
   ------------------------------------------------------------ */
.hero {
  padding: var(--space-xl) 0 calc(var(--space-xl) * 1.5);
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-content { width: 100%; }

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  margin-bottom: var(--space-md);
  opacity: 0.75;
}

.hero h1 {
  font-size: 2.8rem;
  line-height: 1.1;
  margin-bottom: var(--space-md);
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto var(--space-lg);
  line-height: 1.65;
}

.hero-links {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.55em 1.1em;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
}

.btn:hover  { border-color: var(--accent); color: var(--accent); }
.btn-accent { border-color: var(--accent); color: var(--accent); }

.home-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

@media (max-width: 600px) {
  .home-sections { grid-template-columns: 1fr; }
}

.home-section-link                   { display: block; color: var(--text); }
.home-section-link:hover .card-title { color: var(--accent); }


/* ------------------------------------------------------------
   BLOG
   ------------------------------------------------------------ */
.post-list { display: flex; flex-direction: column; }
.post-item { display: block; color: var(--text); }
.post-item:hover .card-title { color: var(--accent); }

.post-content h1 { margin-bottom: var(--space-lg); }

.post-content h1::after {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: var(--accent);
  margin-top: var(--space-sm);
}

.post-content h2 { margin-top: var(--space-lg); }
.post-content h3 { margin-top: var(--space-md); }

.post-content ul,
.post-content ol {
  list-style: initial;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.post-content img { max-width: 100%; margin: var(--space-md) 0; }

.post-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  align-items: center;
}

.post-pagination {
  display: flex;
  gap: var(--space-md);
  margin: var(--space-xl) 0 var(--space-md);
  padding-top: var(--space-md);
}

.post-footer { margin-top: var(--space-md); }


/* ------------------------------------------------------------
   PROJECTS
   ------------------------------------------------------------ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-card { text-align: center; padding: var(--space-md); }

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: lowercase;
  letter-spacing: 0.1em;
}

.projects-grid         { display: flex; flex-direction: column; }
.project-links         { display: flex; gap: var(--space-md); margin-top: var(--space-sm); }
.project-link,
.project-links a       { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); transition: color 0.2s; }
.project-link:hover,
.project-links a:hover { color: var(--accent); }
.project-stars         { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); opacity: 0.7; }
.projects-updated      { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); margin-top: var(--space-lg); opacity: 0.4; }


/* ------------------------------------------------------------
   CONTACT
   ------------------------------------------------------------ */
.contact-block { margin-bottom: var(--space-md); padding-bottom: var(--space-md); border-bottom: 1px solid var(--border); }
.contact-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: var(--space-xs);
  opacity: 0.8;
}

.contact-value { font-family: var(--font-mono); font-size: 0.92rem; color: var(--text); }

.pgp-block   { margin-top: var(--space-lg); }
.pgp-fp      { font-size: 0.82rem; color: var(--text-muted); margin-bottom: var(--space-md); }
.pgp-fp code { font-size: 0.78rem; }

.pgp-key {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--surface-1);
  border-left: 1px solid var(--border);
  padding: var(--space-md);
  overflow-x: auto;
  white-space: pre;
  color: var(--text-muted);
  line-height: 1.5;
}


/* ------------------------------------------------------------
   DONATE — crypto rows + pure CSS QR modals
   ------------------------------------------------------------ */
.crypto-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}

.crypto-row:last-child { border-bottom: none; }

.crypto-meta {
  display: flex;
  flex-direction: column;
  min-width: 48px;
}

.crypto-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.crypto-name {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.crypto-addr {
  flex: 1;
  overflow: hidden;
}

.crypto-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s;
}

.crypto-link:hover { color: var(--text); }

.qr-trigger {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.2em 0.6em;
  opacity: 0.7;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.qr-trigger:hover { opacity: 1; }

.donate-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: var(--space-md);
  opacity: 0.6;
}

/* QR modal — hidden by default, shown when :target matches */
.qr-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  background: rgba(0, 0, 0, 0.8);
}

/* show when this element is the URL target */
.qr-modal:target {
  display: flex;
}

.qr-backdrop {
  position: absolute;
  inset: 0;
}

.qr-box {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  z-index: 1;
}

/* accent corner brackets on the QR box */
.qr-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 12px; height: 12px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}

.qr-box::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 12px; height: 12px;
  border-bottom: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}

.qr-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.qr-box img {
  display: block;
  image-rendering: pixelated;  /* keeps QR sharp, no anti-aliasing blur */
}

.qr-addr {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  word-break: break-all;
  text-align: center;
  max-width: 220px;
}


/* ------------------------------------------------------------
   404 / ERROR
   ------------------------------------------------------------ */
.error-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60vh;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 5rem;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.4;
  line-height: 1;
  margin-bottom: var(--space-md);
}

.error-page .btn {
  align-self: flex-start;
}

.error-msg { font-family: var(--font-heading); font-size: 1.4rem; margin-bottom: var(--space-sm); }

.error-sub {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-bottom: var(--space-lg);
}


/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 600px) {
  main             { padding: var(--space-lg) var(--space-md); }
  .hero h1         { font-size: 2rem; }
  .site-header     { padding: 0 var(--space-md); gap: var(--space-lg); }
  .site-nav        { gap: var(--space-md); }
  .error-code      { font-size: 3.5rem; }
  .crypto-link     { font-size: 0.68rem; }
}