/* xerz.net — graphite / shadcn-zinc system */

:root {
  --background: #000000;          /* pure black */
  --surface: #0c0c0d;             /* graphite */
  --card: #0a0a0b;
  --card-solid: #0a0a0b;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.15);
  --foreground: #ffffff;          /* white on black */
  --muted: #8f8f94;               /* graphite sub-text */
  --dim: #55555a;
  --primary: #ffffff;
  --primary-fg: #000000;
  --live: #4ade80;                /* green — live/online/launched only */
  --live-soft: rgba(74, 222, 128, 0.1);
  --idle: #eab308;
  --dnd: #ef4444;
  --radius: 8px;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  --maxw: 1100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--foreground); color: var(--background); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.mono { font-family: var(--mono); }

:focus-visible { outline: 2px solid var(--muted); outline-offset: 2px; border-radius: 2px; }

/* ---------- primitives ---------- */

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

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--dim);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 13.5px; font-weight: 500;
  border-radius: 6px; padding: 9px 18px;
  border: 1px solid transparent;
  cursor: pointer; transition: opacity .15s, background .15s, border-color .15s;
  text-align: center;
}
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { opacity: .88; }
.btn-outline { background: transparent; color: var(--foreground); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--muted); background: rgba(255,255,255,.03); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-ghost:hover { color: var(--foreground); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.full { width: 100%; }

.badge {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 4px; border: 1px solid var(--border);
  color: var(--muted); background: rgba(255,255,255,.02);
}
.badge.live { color: var(--live); border-color: rgba(74,222,128,.3); background: var(--live-soft); }
.badge.neutral { color: var(--foreground); border-color: var(--border-strong); }

.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--live); box-shadow: 0 0 8px var(--live);
  display: inline-block; animation: dotpulse 2.2s ease-in-out infinite;
}
@keyframes dotpulse { 0%,100%{opacity:.4} 50%{opacity:1} }

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

nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(9,9,11,.8); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  height: 56px; display: flex; align-items: center; gap: 28px;
}
.nav-brand { font-family: var(--mono); font-weight: 600; font-size: 14px; }
.nav-links { display: flex; gap: 22px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.nav-links a { transition: color .15s; }
.nav-links a:hover { color: var(--foreground); }
.nav-meta { margin-left: auto; display: flex; align-items: center; gap: 16px; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.avail { display: flex; align-items: center; gap: 8px; color: var(--muted); }
@media (max-width: 780px) { .nav-links { display: none; } }

/* ---------- preloader ---------- */

#loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--background);
  display: flex; align-items: center; justify-content: center;
  transform: translateY(0);
}
#loader.lift {
  transition: transform .8s cubic-bezier(.76, 0, .24, 1);
  transform: translateY(-100%);
}
.loader-inner { text-align: center; position: relative; }
.loader-inner::before {
  content: ''; position: absolute; inset: -120px;
  background: radial-gradient(circle, rgba(255,255,255,.045) 0%, transparent 65%);
  opacity: 0; animation: glowIn .9s ease .35s forwards;
}
.loader-welcome {
  font-family: var(--mono); font-size: 11px; letter-spacing: .55em; text-transform: uppercase;
  color: var(--dim); position: relative;
  opacity: 0; transform: translateY(8px);
  animation: fadeUp .55s ease .15s forwards;
}
.loader-name {
  font-size: clamp(56px, 9vw, 96px); font-weight: 600; letter-spacing: -0.03em;
  line-height: 1.1; position: relative;
  opacity: 0; transform: translateY(14px) scale(.985);
  animation: fadeUp .65s cubic-bezier(.2,.8,.2,1) .45s forwards;
}
.loader-tag {
  font-size: 14px; color: var(--muted); position: relative;
  opacity: 0; transform: translateY(8px);
  animation: fadeUp .55s ease .8s forwards;
}
@keyframes fadeUp { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes glowIn { to { opacity: 1; } }
body.loading { overflow: hidden; }

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

main { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section.block { padding: 88px 0 48px; }
.sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 48px; }
.sec-num { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.sec-title { font-family: var(--mono); font-size: 12px; letter-spacing: .38em; color: var(--muted); text-transform: uppercase; }
.sec-head::after { content: ''; flex: 1; height: 1px; background: var(--border); }

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

#hero {
  min-height: 100vh; display: flex; align-items: center;
  padding-top: 56px; position: relative;
}
#hero::before {
  content: ''; position: absolute; top: 0; left: 0; width: 40%; height: 55%;
  background: radial-gradient(ellipse at top left, rgba(255,255,255,.025), transparent 70%);
  pointer-events: none;
}
.hero-name {
  font-weight: 600; font-size: clamp(72px, 13vw, 150px);
  line-height: 1; letter-spacing: -0.045em; user-select: none;
  color: transparent;
  background: linear-gradient(100deg,
    #cfcfd2 0%, #cfcfd2 38%, #ffffff 50%, #cfcfd2 62%, #cfcfd2 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  animation: sheen 7s linear infinite;
  opacity: 0; transform: translateY(16px);
}
body.loaded .hero-name { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
@keyframes sheen {
  0% { background-position: 125% 0; }
  100% { background-position: -125% 0; }
}
.hero-info { margin-top: 28px; }
.hero-info h1 { font-size: clamp(20px, 3vw, 28px); font-weight: 500; margin-bottom: 12px; }
.hero-info > p { color: var(--muted); max-width: 48ch; margin-bottom: 44px; }
.hero-meta { display: flex; gap: 48px; }
.hm .k { font-family: var(--mono); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); display: block; margin-bottom: 6px; }
.hm .v { font-family: var(--mono); font-size: 15px; }
@media (max-width: 780px) {
  .hero-meta { flex-wrap: wrap; gap: 26px; }
}

/* ---------- about ---------- */

.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.about-copy p { color: var(--muted); margin-bottom: 20px; max-width: 60ch; }
.about-copy strong { color: var(--foreground); font-weight: 500; }
.kv-card { padding: 24px; font-family: var(--mono); font-size: 13px; }
.kv-title { font-size: 10px; letter-spacing: .32em; text-transform: uppercase; color: var(--dim); margin-bottom: 16px; }
.kv-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.kv-row:last-child { border-bottom: none; }
.kv-row .k { color: var(--dim); }
.kv-row .v { text-align: right; }
.kv-row .v.live { color: var(--live); }
@media (max-width: 780px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- projects ---------- */

.proj-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.proj { padding: 26px; display: flex; flex-direction: column; gap: 14px; transition: border-color .2s, transform .2s, background .2s; }
.proj:hover { border-color: var(--border-strong); background: rgba(255,255,255,.03); transform: translateY(-2px); }
.proj-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.proj h3 { font-size: 17px; font-weight: 600; }
.proj .role { font-family: var(--mono); font-size: 11px; color: var(--dim); margin-top: 2px; }
.proj p { color: var(--muted); font-size: 14px; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 3px 9px; }
.proj-link { font-family: var(--mono); font-size: 12px; color: var(--foreground); opacity: .8; }
.proj-link:hover { opacity: 1; text-decoration: underline; }
@media (max-width: 780px) { .proj-grid { grid-template-columns: 1fr; } }

/* ---------- skills ---------- */

.skill-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.skill {
  font-family: var(--mono); font-size: 13px; color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px; padding: 9px 16px;
  transition: color .15s, border-color .15s;
}
.skill:hover { color: var(--foreground); border-color: var(--border-strong); }

/* ---------- timeline ---------- */

.tl { position: relative; padding-left: 30px; }
.tl::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 38px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: -29px; top: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--background); border: 2px solid var(--dim);
}
.tl-item.live::before { border-color: var(--live); box-shadow: 0 0 10px var(--live-soft); }
.tl-date { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .12em; margin-bottom: 4px; }
.tl-item h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.tl-item p { color: var(--muted); font-size: 14px; max-width: 56ch; }

/* ---------- live status ---------- */

.live-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.panel { padding: 26px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.panel-title { font-family: var(--mono); font-size: 10px; letter-spacing: .32em; color: var(--dim); text-transform: uppercase; }
.panel-via { font-family: var(--mono); font-size: 10px; color: var(--dim); }
.presence { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.pfp { width: 52px; height: 52px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); position: relative; }
.pfp img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pfp .st { position: absolute; bottom: 0; right: 0; width: 13px; height: 13px; border-radius: 50%; border: 3px solid var(--card-solid); background: var(--dim); }
.pfp .st.online { background: var(--live); }
.pfp .st.idle { background: var(--idle); }
.pfp .st.dnd { background: var(--dnd); }
.presence .u { font-family: var(--mono); font-size: 14px; font-weight: 600; }
.presence .s { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: capitalize; }
.activity {
  border: 1px solid var(--border); border-radius: 6px; padding: 16px;
  font-family: var(--mono); font-size: 12.5px; background: var(--surface);
}
.a-label { font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--live); margin-bottom: 10px; }
.activity.empty .a-label { color: var(--dim); }
.a-name { font-weight: 600; margin-bottom: 3px; }
.a-line { color: var(--muted); }
.a-time { color: var(--dim); margin-top: 8px; font-size: 11px; }

/* now card — clock first, details float beneath */
.now-clock {
  font-family: var(--mono); font-weight: 600;
  font-size: clamp(30px, 3.4vw, 40px); letter-spacing: .01em;
  line-height: 1; margin: 6px 0 22px;
}
.now-rows { display: flex; flex-direction: column; gap: 10px; }
.now-row { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12.5px; }
.now-row .k { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); min-width: 92px; }
.now-row .v { color: var(--muted); }
.now-row .v.live { color: var(--live); }

/* ---------- vouches (shared) ---------- */

.rating-big { font-family: var(--mono); font-size: 52px; font-weight: 600; line-height: 1; }
.rating-of { font-family: var(--mono); font-size: 14px; color: var(--dim); }
.rating-count { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ticks { display: flex; gap: 5px; margin: 14px 0 10px; }
.ticks i { height: 4px; flex: 1; border-radius: 2px; background: var(--border); }
.ticks i.on { background: var(--foreground); }

.vouch-card { padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.vouch-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vouch-id { display: flex; align-items: center; gap: 12px; }
.vouch-pfp { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); overflow: hidden; flex-shrink: 0; }
.vouch-pfp img { width: 100%; height: 100%; object-fit: cover; }
.vouch-name { font-size: 14px; font-weight: 600; }
.vouch-handle { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.vouch-score { font-family: var(--mono); font-size: 12px; }
.vouch-score b { font-size: 13px; }
.vouch-score .of { color: var(--dim); }
.vouch-msg { color: var(--muted); font-size: 14.5px; border-top: 1px solid var(--border); padding-top: 12px; }
.vouch-date { font-family: var(--mono); font-size: 11px; color: var(--dim); }

.dist-row { display: grid; grid-template-columns: 18px 1fr 24px; align-items: center; gap: 12px; font-family: var(--mono); font-size: 11px; color: var(--dim); margin-bottom: 7px; }
.dist-bar { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.dist-fill { height: 100%; background: var(--muted); border-radius: 2px; width: 0%; transition: width .6s ease; }
.dist-n { text-align: right; }

/* ---------- forms ---------- */

.field label { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
textarea, select {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; color: var(--foreground); font-family: var(--sans); font-size: 14px;
  padding: 10px 12px; resize: vertical;
}
textarea:focus, select:focus { outline: none; border-color: var(--muted); }
.rating-pick { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.rating-pick button {
  font-family: var(--mono); font-size: 12px; padding: 8px 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 5px;
  color: var(--muted); cursor: pointer; transition: all .12s;
}
.rating-pick button:hover { border-color: var(--muted); color: var(--foreground); }
.rating-pick button.on { background: var(--foreground); color: var(--background); border-color: var(--foreground); }

.note { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.note.ok { color: var(--live); }
.note.err { color: var(--dnd); }

/* ---------- contact / footer ---------- */

#contact h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 600; margin-bottom: 14px; }
#contact .lead { color: var(--muted); max-width: 52ch; margin-bottom: 44px; }
.contact-grid { display: flex; flex-direction: column; gap: 12px; max-width: 520px; }
.c-item {
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  transition: border-color .15s, transform .15s, background .15s;
}
.c-item:hover { border-color: var(--border-strong); background: rgba(255,255,255,.03); transform: translateX(3px); }
.c-item .k { font-family: var(--mono); font-size: 10px; letter-spacing: .25em; color: var(--dim); text-transform: uppercase; }
.c-item .v { font-family: var(--mono); font-size: 13.5px; }

footer.site-footer {
  max-width: var(--maxw); margin: 0 auto; padding: 28px 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px; color: var(--dim);
}

/* ---------- motion safety ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  #loader { display: none; }
  .hero-name { opacity: 1; transform: none; animation: none; color: var(--foreground); background: none; }
}
