/* kobysb.me — terminal direction (B), production styles */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
}

:root {
  --bg: #0a0710;
  --bg-2: #0f0a18;
  --ink: #f4efe6;
  --ink-dim: #b6adc0;
  --ink-mute: #6f6678;
  --line: rgba(170, 130, 255, 0.18);
  --line-soft: rgba(170, 130, 255, 0.08);
  --accent: #a259ff;
  --accent-2: #7c3aed;
  --accent-glow: rgba(162, 89, 255, 0.35);

  --max: 1280px;
  --pad: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

::selection { background: var(--accent); color: #0a0710; }

a { color: inherit; }

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ── Reveal animation ───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

@keyframes blink { 50% { opacity: 0; } }
.cursor { display: inline-block; color: var(--accent); animation: blink 1.05s steps(1, end) infinite; margin-left: -.05em; }

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0); }
  50%  { transform: translate3d(0, -30px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* ── Background ─────────────────────────────────────────────────── */
.bg-fixed {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: var(--bg);
}
.bg-dots {
  position: absolute; inset: -20%;
  background-image: radial-gradient(circle, rgba(170,130,255,0.10) 1px, transparent 1px);
  background-size: 24px 24px;
  animation: drift 18s ease-in-out infinite;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.bg-glow {
  position: absolute;
  width: 1100px; height: 800px;
  left: -200px; top: -120px;
  background: radial-gradient(circle, var(--accent-glow), transparent 60%);
  filter: blur(40px);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: drift 22s ease-in-out infinite;
}

/* ── Nav ────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10,7,16,0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  font-size: 13px;
}
.nav-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.nav-prompt { display: flex; align-items: center; gap: 8px; }
.nav-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.nav-path { color: var(--ink-dim); }
.nav-sigil { color: var(--accent); }
.nav-cmd { color: var(--ink); }
.nav-meta { color: var(--ink-mute); }
.nav-links { display: flex; gap: 2px; }
.nav-link {
  padding: 6px 11px; border-radius: 6px;
  color: var(--ink-dim);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: rgba(162,89,255,0.10); color: var(--ink); }
.nav-link.active { color: var(--ink); background: rgba(162,89,255,0.14); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 11px;
  border: 1px solid var(--line); border-radius: 6px;
  background: transparent;
  color: var(--ink-mute);
  font: inherit;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.nav-cta:hover { border-color: var(--accent); color: var(--ink); background: rgba(162,89,255,0.08); }
.nav-cta kbd {
  display: inline-flex; align-items: center;
  padding: 1px 6px; border-radius: 4px;
  background: rgba(162,89,255,0.14); color: var(--accent);
  font: inherit; font-size: 11px;
}

/* ── Section pattern ────────────────────────────────────────────── */
section { padding: 80px 0; border-top: 1px dashed var(--line); }
section:first-of-type { border-top: 0; }
.section-head {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  margin-bottom: 28px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.section-prompt { color: var(--accent); letter-spacing: 0.15em; font-size: 11px; }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero { position: relative; padding-top: 100px; border-top: 0; }
.hero-grid {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 56px; align-items: end;
}
.hero-init {
  font-size: 11px; color: var(--accent); letter-spacing: 0.1em;
  margin-bottom: 32px;
}
.hero h1 {
  margin: 0;
  font-size: clamp(72px, 11vw, 140px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.9;
}
.hero-role {
  font-size: clamp(26px, 3.6vw, 44px);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink-mute);
  margin-top: 22px;
  line-height: 1.05;
}
.hero-tag {
  margin-top: 32px;
  max-width: 480px;
  font-size: 15px; color: var(--ink-dim);
  line-height: 1.6;
}
.hero-ctas { margin-top: 32px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent; color: var(--ink);
  font: inherit; font-size: 13px; font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s;
}
.btn:hover { background: rgba(162,89,255,0.08); border-color: var(--accent); }
.btn--filled {
  background: var(--accent); color: #0a0710; border-color: var(--accent);
  font-weight: 600;
}
.btn--filled:hover { background: #b97cff; box-shadow: 0 0 24px var(--accent-glow); }

/* Status card */
.statcard {
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(15,10,24,0.7);
  backdrop-filter: blur(6px);
}
.statcard-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}
.statcard-head .name { color: var(--ink); }
.statcard-head .live { margin-left: auto; color: var(--ink-mute); font-size: 10px; letter-spacing: 0.1em; }
.statcard-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 11px; font-size: 12.5px; }
.statcard-row { display: flex; justify-content: space-between; }
.statcard-row .k { color: var(--ink-mute); }
.statcard-row .v { color: var(--ink); }
.green { color: #42d77d; }

/* ── About ──────────────────────────────────────────────────────── */
.about-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; max-width: 820px; }
.about-list li {
  display: flex; gap: 14px;
  font-size: 16px; color: var(--ink); line-height: 1.45;
}
.about-list .num { color: var(--accent); font-size: 12px; padding-top: 4px; }

/* ── Experience log ─────────────────────────────────────────────── */
.edu {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15,10,24,0.5);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.edu-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  font-size: 13px;
}
.edu-status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 10.5px;
  letter-spacing: 0.18em;
}
@keyframes edu-pulse {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 var(--accent-glow); }
  50%      { transform: scale(1.2); opacity: .85; box-shadow: 0 0 0 6px transparent; }
}
.edu-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: edu-pulse 1.4s ease-in-out infinite;
  box-shadow: 0 0 8px var(--accent);
}
.edu-co  { color: var(--ink); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.edu-deg { color: var(--ink-dim); }
.edu-eta { margin-left: auto; color: var(--ink-mute); font-size: 11px; letter-spacing: 0.1em; }
.edu-bar {
  position: relative;
  height: 6px; border-radius: 4px;
  background: var(--line-soft);
  overflow: hidden;
}
.edu-bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 4px;
  transition: width .8s cubic-bezier(.2,.7,.2,1);
}
@keyframes edu-shine {
  from { transform: translateX(-100%); }
  to   { transform: translateX(220%); }
}
.edu-bar-shine {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: edu-shine 2.6s ease-in-out infinite;
  pointer-events: none;
}
.edu-bar-pct {
  text-align: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-top: 4px;
}
.log {
  font-size: 13px; line-height: 1.7;
  background: rgba(15,10,24,0.5);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 16px 20px;
  overflow-x: auto;
}
.log-row { display: grid; grid-template-columns: 130px 64px 1fr 1.4fr; gap: 14px; }
.log-role { color: var(--ink-dim); font-style: normal; }
.log-row .t { color: var(--ink-mute); }
.log-row .lvl-OK   { color: #42d77d; }
.log-row .lvl-JOIN { color: var(--accent); }
.log-row .lvl-INFO { color: var(--ink-dim); }
.log-row .lvl-BOOT { color: var(--ink-dim); }
.log-row .co { color: var(--ink); }
.log-row .msg { color: var(--ink-dim); }

/* ── Inline highlight bullets under WireStar log entry ── */
.log-bullets {
  list-style: none;
  padding: 8px 0 4px 0;
  margin: 0 0 0 calc(130px + 64px + 28px);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.log-bullets li {
  display: grid;
  grid-template-columns: 14px auto auto 1fr;
  gap: 10px;
  align-items: baseline;
  font-size: 13px;
  line-height: 1.45;
}
.log-bullets .bullet-marker { color: var(--accent); }
.log-bullets .bullet-metric { color: var(--accent); font-weight: 500; min-width: 70px; }
.log-bullets .bullet-sep    { color: var(--ink-mute); }
.log-bullets .bullet-text   { color: var(--ink-dim); }
@media (max-width: 900px) {
  .log-bullets { margin-left: 0; padding-top: 12px; border-top: 1px dashed var(--line-soft); margin-top: 12px; }
  .log-bullets li { grid-template-columns: 14px 1fr; row-gap: 2px; }
  .log-bullets .bullet-sep { display: none; }
  .log-bullets .bullet-metric { grid-column: 2; }
  .log-bullets .bullet-text   { grid-column: 2; color: var(--ink-mute); font-size: 12px; }
}

/* ── Widgets ────────────────────────────────────────────────────── */
.widgets { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; }
.widget {
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(15,10,24,0.6);
  padding: 18px;
}
.widget-label {
  font-size: 10px; color: var(--ink-mute); letter-spacing: 0.05em; margin-bottom: 12px;
}
.spot { display: flex; gap: 14px; align-items: center; }
.spot-cover {
  width: 68px; height: 68px; border-radius: 4px;
  background: linear-gradient(135deg, #1ed760, #7c3aed);
  position: relative; overflow: hidden;
  flex-shrink: 0;
  object-fit: cover;
  display: block;
}
.spot-cover::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.3), transparent 50%);
}
img.spot-cover::after { content: none; }
.spot-title {
  font-size: 16px; font-weight: 600; letter-spacing: -0.02em;
  display: block; text-decoration: none; color: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
a.spot-title:hover { color: var(--accent); }
.spot-sub {
  font-size: 12px; color: var(--ink-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.spot-state {
  display: flex; align-items: center; gap: 7px;
  font-size: 10px; letter-spacing: 0.08em; margin-top: 10px;
  color: var(--ink-mute); text-transform: uppercase;
}
.spot-state.live { color: var(--accent); }
.spot-state.err  { color: #ef4444; }
.spot-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.spot-eq i {
  width: 2px; height: 100%; background: var(--accent);
  transform-origin: bottom; animation: spotEq 0.9s ease-in-out infinite;
}
.spot-eq i:nth-child(2) { animation-delay: 0.3s; }
.spot-eq i:nth-child(3) { animation-delay: 0.6s; }
@keyframes spotEq {
  0%, 100% { transform: scaleY(0.35); }
  50%      { transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
  .spot-eq i { animation: none; transform: scaleY(0.6); }
}

.uptime-num { font-size: 32px; color: var(--accent); }
.uptime-num + span { color: var(--ink-dim); }
.alive-num {
  font-size: 32px;
  color: var(--ink);
  letter-spacing: -0.02em;
  display: flex; align-items: baseline; gap: 4px;
  flex-wrap: wrap;
}
.alive-num .unit {
  color: var(--accent);
  font-size: 16px;
  margin: 0 6px 0 1px;
}
.uptime-bars span.dim { background: var(--ink-mute); }
.uptime-bars { display: flex; gap: 2px; margin-top: 14px; }
.uptime-bars span { flex: 1; height: 22px; background: var(--accent); border-radius: 1px; }
.uptime-bars span.dip { background: #ff5470; }
.uptime-num.down { color: #ff5470; }
.uptime-down-label { color: #ff5470; letter-spacing: 0.1em; }

.clock { font-size: 32px; color: var(--ink); }
.clock-meta { font-size: 11px; color: var(--ink-dim); margin-top: 6px; }

/* ── Projects ───────────────────────────────────────────────────── */
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.proj {
  border: 1px solid var(--line); border-radius: 8px;
  background: rgba(15,10,24,0.6); overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.proj:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(162,89,255,0.15);
}
.proj-head {
  font-size: 11px; padding: 8px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-mute);
  display: flex; justify-content: space-between;
}
.proj-head .lang { color: var(--accent); }
.proj-body { padding: 20px; }
.proj h3 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.proj p  { margin: 8px 0 18px; font-size: 14px; color: var(--ink-dim); line-height: 1.55; }
.proj-meta {
  font-size: 11px; display: flex; gap: 14px; color: var(--ink-mute);
}
.proj-meta .go { margin-left: auto; color: var(--accent); }

/* ── Contact ────────────────────────────────────────────────────── */
.contact-prompt { font-size: 12px; color: var(--ink-dim); margin-bottom: 14px; }
.contact h2 {
  margin: 0;
  font-size: clamp(40px, 6.5vw, 80px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  word-break: break-word;
}
.contact h2 .at { color: var(--accent); }
.contact-links { display: flex; gap: 28px; margin-top: 28px; font-size: 13px; color: var(--ink-dim); flex-wrap: wrap; }
.contact-links a { color: inherit; text-decoration: none; transition: color .15s; }
.contact-links a:hover { color: var(--accent); }

.footer-bar {
  margin-top: 60px; padding: 18px 0;
  border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between;
  font-size: 10.5px; color: var(--ink-mute);
}

/* ── Command Palette ────────────────────────────────────────────── */
.cmdk-back {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 3, 10, 0.6);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 14vh;
  animation: cmdk-fade .15s ease both;
}
@keyframes cmdk-fade { from { opacity: 0; } to { opacity: 1; } }
.cmdk {
  width: min(560px, calc(100vw - 32px));
  background: #14101e;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(162,89,255,0.05);
  overflow: hidden;
  animation: cmdk-pop .18s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes cmdk-pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
.cmdk input {
  width: 100%;
  background: transparent;
  border: 0; outline: 0;
  padding: 18px 20px;
  font: inherit; font-size: 15px;
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}
.cmdk input::placeholder { color: var(--ink-mute); }
.cmdk-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.cmdk-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 8px;
  cursor: pointer; color: var(--ink-dim);
  font-size: 14px;
}
.cmdk-item .sigil { color: var(--accent); width: 14px; }
.cmdk-item .meta  { margin-left: auto; color: var(--ink-mute); font-size: 11px; }
.cmdk-item.sel, .cmdk-item:hover { background: rgba(162,89,255,0.12); color: var(--ink); }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; align-items: start; }
  .widgets { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }
  .log-row { grid-template-columns: 110px 50px 1fr; }
  .log-row .msg { display: none; }
  .edu-eta { margin-left: 0; width: 100%; }
  .nav-meta { display: none; }
  .nav-prompt .nav-cmd { display: none; }
}
@media (max-width: 640px) {
  .nav-links { gap: 0; font-size: 12px; }
  .nav-link { padding: 5px 8px; }
  .nav-cta span:not(kbd) { display: none; }
  section { padding: 56px 0; }
}
