/* ============================================================
   VLPL — personal system. Brutalist / poster dark theme.
   Deliberately unlike vflow.ch: no gradients, no rounded corners,
   no soft glow — hard edges, one loud accent, huge type.
   ============================================================ */

:root {
  --bg: #0a0a0a;
  --bg-raise: #141414;
  --bg-card: #171717;
  --ink: #f5f4ef;
  --ink-dim: #a3a39b;
  --ink-faint: #5f5f58;
  --accent: #d7ff3d;
  --accent-ink: #0a0a0a;
  --pink: #ff3d6e;
  --line: rgba(245, 244, 239, 0.16);
  --line-strong: rgba(245, 244, 239, 0.34);
  --maxw: 1180px;
  --font-display: "Archivo Black", "Arial Black", sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Space Mono", "SFMono-Regular", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* flat halftone dot texture — no glow, no gradient */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(245, 244, 239, 0.07) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 55%);
}

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

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

.topbar { height: 5px; background: var(--accent); }

/* ---------- type helpers ---------- */

.tag-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 5px 10px;
}

.section-num {
  font-family: var(--font-display);
  font-size: clamp(80px, 12vw, 160px);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  position: absolute;
  top: -0.15em;
  right: 0;
  z-index: 0;
  user-select: none;
  pointer-events: none;
}

.section-head { position: relative; max-width: 680px; margin-bottom: 52px; z-index: 1; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 48px);
  text-transform: uppercase;
  line-height: 1.02;
  margin: 16px 0 14px;
  letter-spacing: -0.01em;
}
.section-head p { color: var(--ink-dim); font-size: 16.5px; max-width: 520px; }

.mark {
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0 6px;
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.mono { font-family: var(--font-mono); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 26px;
  border: 2px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--bg); color: var(--accent); border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--ink);
  background: var(--bg);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 17px; text-transform: uppercase; }
.brand .dim { color: var(--ink-faint); font-family: var(--font-mono); font-weight: 400; font-size: 11px; text-transform: none; }

/* ---------- badge / logo mark ---------- */
/* layered stamp: rotated outline behind a solid fill, with crop-mark ticks (lg only) */
.badge { position: relative; flex-shrink: 0; }
.badge .b-outline {
  position: absolute; inset: 0;
  border: 2px solid var(--ink);
  transform: rotate(-8deg);
}
.badge .b-fill {
  position: absolute; inset: 0;
  background: var(--accent);
  transform: rotate(5deg);
  display: flex; align-items: center; justify-content: center;
}
.badge .b-fill em {
  font-style: normal;
  font-family: var(--font-display);
  color: var(--accent-ink);
  transform: rotate(-5deg);
  line-height: 1;
}
.badge-sm { width: 34px; height: 34px; }
.badge-sm .b-fill em { font-size: 13px; }

.badge-lg { width: 148px; height: 148px; }
.badge-lg .b-fill em { font-size: 46px; }
.badge-lg .b-outline { transform: rotate(-7deg); }
.badge-lg .b-fill { transform: rotate(4deg); }
.badge-lg .b-fill em { transform: rotate(-4deg); }
.badge-lg .crop { position: absolute; width: 18px; height: 18px; }
.badge-lg .crop::before, .badge-lg .crop::after { content: ""; position: absolute; background: var(--accent); }
.badge-lg .crop::before { width: 18px; height: 2px; }
.badge-lg .crop::after { width: 2px; height: 18px; }
.badge-lg .crop.tl { top: -16px; left: -16px; }
.badge-lg .crop.tl::before, .badge-lg .crop.tl::after { top: 0; left: 0; }
.badge-lg .crop.tr { top: -16px; right: -16px; }
.badge-lg .crop.tr::before, .badge-lg .crop.tr::after { top: 0; right: 0; }
.badge-lg .crop.bl { bottom: -16px; left: -16px; }
.badge-lg .crop.bl::before, .badge-lg .crop.bl::after { bottom: 0; left: 0; }
.badge-lg .crop.br { bottom: -16px; right: -16px; }
.badge-lg .crop.br::before, .badge-lg .crop.br::after { bottom: 0; right: 0; }
.badge-lg[data-draggable] { cursor: grab; touch-action: none; }
.badge-lg[data-draggable]:active { cursor: grabbing; }
.badge-lg.dragging { transition: none !important; }
.badge-lg.snap-back { transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }

.nav-links { display: flex; align-items: center; gap: 28px; font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; color: var(--ink-dim); }
.nav-links a { transition: color 0.15s ease; }
.nav-links a:hover { color: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-cta { display: none; }
@media (min-width: 900px) { .nav-cta { display: inline-flex; } }

.nav-toggle { display: flex; flex-direction: column; gap: 5px; width: 26px; }
.nav-toggle span { height: 2px; background: var(--ink); display: block; }
@media (min-width: 900px) { .nav-toggle { display: none; } }
@media (max-width: 899px) { .nav-links { display: none; } }
.nav-links.open {
  display: flex; flex-direction: column;
  position: absolute; top: 74px; left: 0; right: 0;
  background: var(--bg); border-bottom: 2px solid var(--ink);
  padding: 20px 28px 26px; gap: 18px;
}

/* ---------- hero ---------- */

.hero { padding: 72px 0 0; border-bottom: 2px solid var(--ink); }
.hero-top { display: grid; gap: 40px; align-items: start; padding-bottom: 56px; }
@media (min-width: 980px) { .hero-top { grid-template-columns: 1fr auto; } }

.hero-kicker { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.hero-kicker .dot { width: 8px; height: 8px; background: var(--accent); }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 8.5vw, 108px);
  line-height: 0.94;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero-side {
  display: flex; flex-direction: column; align-items: flex-end; gap: 18px;
}
@media (max-width: 979px) { .hero-side { flex-direction: row; align-items: center; } }

.hero-bottom { display: grid; gap: 0; grid-template-columns: 1fr; border-top: 2px solid var(--ink); }
@media (min-width: 760px) { .hero-bottom { grid-template-columns: 1.3fr 1fr; } }
.hero-lead-col { padding: 32px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .hero-lead-col { border-bottom: none; border-right: 1px solid var(--line); padding-right: 40px; } }
.hero-lead { font-size: 18px; color: var(--ink-dim); max-width: 480px; }
.hero-lead a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.hero-actions-col { padding: 32px 0 32px 0; }
@media (min-width: 760px) { .hero-actions-col { padding-left: 40px; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.hero-meta { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-faint); display: flex; flex-wrap: wrap; gap: 8px; }
.hero-meta span:not(:last-child)::after { content: "/"; margin-left: 8px; color: var(--line-strong); }

/* marquee ticker */
.ticker { border-bottom: 2px solid var(--ink); background: var(--accent); overflow: hidden; }
.ticker-track {
  display: flex; width: max-content;
  animation: ticker 26s linear infinite;
  padding: 12px 0;
}
.ticker-track span {
  font-family: var(--font-mono); font-size: 14px; font-weight: 600; text-transform: uppercase;
  color: var(--accent-ink); white-space: nowrap; padding: 0 22px;
  border-right: 2px solid var(--accent-ink);
}
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ---------- sections ---------- */

section { padding: 84px 0; position: relative; overflow: hidden; }
.section-alt { background: var(--bg-raise); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }

/* stack */
.stack-grid { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); border: 1px solid var(--line); position: relative; z-index: 1; }
.stack-col { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 28px; background: var(--bg); }
.stack-col .tag-label { margin-bottom: 16px; }
.stack-col h3 { font-family: var(--font-display); font-size: 19px; text-transform: uppercase; margin-bottom: 4px; }
.stack-col .sub { color: var(--ink-faint); font-family: var(--font-mono); font-size: 12px; margin-bottom: 18px; }
.stack-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.stack-pills span { font-family: var(--font-mono); font-size: 12px; color: var(--ink-dim); border: 1px solid var(--line-strong); padding: 5px 10px; }

/* github live panel */
.gh-panel { border: 2px solid var(--ink); border-top: none; padding: 28px; position: relative; z-index: 1; }
.gh-panel .gh-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.gh-panel .gh-head h3 { font-family: var(--font-display); font-size: 18px; text-transform: uppercase; }
.gh-live-dot { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); text-transform: uppercase; }
.gh-live-dot span { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.gh-stats { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 24px; }
.gh-stats div { font-family: var(--font-mono); }
.gh-stats .n { font-family: var(--font-display); font-size: 26px; color: var(--accent); display: block; }
.gh-stats .l { font-size: 11px; color: var(--ink-faint); text-transform: uppercase; }
.gh-repos { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.gh-repo { background: var(--bg); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; transition: background 0.15s ease; }
.gh-repo:hover { background: var(--bg-card); }
.gh-repo .repo-name { font-family: var(--font-mono); font-size: 13.5px; color: var(--ink); }
.gh-repo .repo-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-faint); display: flex; gap: 14px; }
.gh-fallback { font-family: var(--font-mono); font-size: 13px; color: var(--ink-faint); }
.gh-fallback a { color: var(--accent); }

/* projects (slim) */
.project-block { border: 2px solid var(--ink); padding: 32px; position: relative; z-index: 1; background: var(--bg); }
.project-block p { color: var(--ink-dim); font-size: 15.5px; max-width: 620px; margin-bottom: 26px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip-row a {
  font-family: var(--font-mono); font-size: 13px; text-transform: uppercase;
  border: 1px solid var(--line-strong); padding: 9px 14px; color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chip-row a:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* about */
.about-grid { display: grid; gap: 0; position: relative; z-index: 1; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1.3fr 1fr; } }
.about-copy { border: 2px solid var(--ink); border-right: none; padding: 34px; }
@media (max-width: 899px) { .about-copy { border-right: 2px solid var(--ink); border-bottom: none; } }
.about-copy p { color: var(--ink-dim); font-size: 16px; margin-bottom: 18px; }
.about-copy p:last-of-type { margin-bottom: 0; }
.about-side { border: 2px solid var(--ink); display: flex; flex-direction: column; }
.stat-row { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.stat-row:last-child { border-bottom: none; }
.stat-row .n { font-family: var(--font-display); font-size: 28px; color: var(--accent); }
.stat-row .l { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; color: var(--ink-faint); text-align: right; }

/* contact / social */
.contact-wrap { position: relative; z-index: 1; }
.contact-lead { font-size: 17px; color: var(--ink-dim); max-width: 560px; margin-bottom: 40px; }
.social-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border: 2px solid var(--ink); }
.social-tile {
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  padding: 26px; display: flex; flex-direction: column; gap: 40px; justify-content: space-between;
  min-height: 140px;
  transition: background 0.15s ease, color 0.15s ease;
}
.social-tile:hover { background: var(--accent); color: var(--accent-ink); }
.social-tile .name { font-family: var(--font-display); font-size: 18px; text-transform: uppercase; }
.social-tile .handle { font-family: var(--font-mono); font-size: 12.5px; color: inherit; opacity: 0.7; }
.social-tile .arrow { font-family: var(--font-mono); font-size: 20px; align-self: flex-end; }

/* contact form */
.form-block { border: 2px solid var(--ink); border-top: none; padding: 36px; }
.form-block .tag-label { margin-bottom: 20px; display: inline-flex; }
.form-block h3 { font-family: var(--font-display); font-size: 24px; text-transform: uppercase; margin-bottom: 8px; }
.form-block > p { color: var(--ink-dim); font-size: 14.5px; margin-bottom: 28px; max-width: 480px; }
.form-grid { display: grid; gap: 18px; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-grid .full { grid-column: 1 / -1; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }
.form-field input, .form-field textarea {
  background: var(--bg);
  border: 2px solid var(--line-strong);
  padding: 13px 14px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14.5px;
  resize: vertical;
  transition: border-color 0.15s ease;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--accent); }
.form-honey { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.form-status { font-family: var(--font-mono); font-size: 13px; margin-top: 16px; display: none; padding: 12px 14px; border: 2px solid; text-transform: uppercase; }
.form-status.show { display: block; }
.form-status.ok { border-color: var(--accent); color: var(--accent); }
.form-status.err { border-color: var(--pink); color: var(--pink); }
.form-submit { margin-top: 22px; }

/* footer */
footer { border-top: 2px solid var(--ink); padding: 48px 0 28px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 30px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; font-family: var(--font-mono); font-size: 12.5px; text-transform: uppercase; color: var(--ink-dim); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 22px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-faint); text-transform: uppercase; }

/* reveal animation */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
[data-reveal].in { opacity: 1; transform: none; }

/* legal pages */
.legal-hero { padding: 56px 0 44px; border-bottom: 2px solid var(--ink); }
.legal-hero h1 { font-family: var(--font-display); font-size: clamp(34px, 6vw, 56px); text-transform: uppercase; margin-bottom: 14px; }
.legal-hero p { color: var(--ink-dim); font-size: 16px; max-width: 620px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-dim); font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; margin-bottom: 26px; }
.back-link:hover { color: var(--accent); }
.prose { max-width: 680px; color: var(--ink-dim); font-size: 15.5px; display: flex; flex-direction: column; gap: 16px; }
.prose h2 { font-family: var(--font-display); color: var(--ink); font-size: 19px; text-transform: uppercase; margin-top: 10px; }

/* 404 */
.notfound { min-height: 78vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 24px; }
.notfound .code { font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 18px; }
.notfound h1 { font-family: var(--font-display); font-size: clamp(60px, 14vw, 140px); color: var(--accent); text-transform: uppercase; }
.notfound p { color: var(--ink-dim); margin: 18px 0 30px; max-width: 420px; }
