/* Minimal, clean theme for a one-file deploy (GitHub Pages friendly) */
:root {
  --bg: #0b0c10;
  --panel: #111318;
  --ink: #e8edf2;
  --muted: #a9b3be;
  --brand: #7cc5ff;
  --accent: #9ee493;
  --ring: rgba(124,197,255,0.4);
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; background: var(--bg); color: var(--ink); font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }

.container { max-width: 980px; margin: 0 auto; padding: 0 20px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header { position: sticky; top: 0; backdrop-filter: blur(8px); background: color-mix(in oklab, var(--bg), transparent 40%); border-bottom: 1px solid #1a1d24; z-index: 10; }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.logo { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--accent)); color:#091018; font-weight: 800; display:grid; place-items:center; }
nav a { margin-left: 16px; color: var(--ink); opacity: .9; }
nav a:hover { opacity: 1; }

.hero { padding: 56px 0 28px; border-bottom: 1px solid #1a1d24; background: radial-gradient(1200px 400px at 50% -50px, color-mix(in oklab, var(--brand), transparent 80%), transparent 70%); }
.hero h1 { font-size: clamp(28px, 6vw, 48px); margin: 0 0 6px 0; }
.tagline { color: var(--muted); margin: 0 0 16px 0; }
.cta { display:flex; gap:12px; flex-wrap: wrap; }
.btn { display:inline-block; padding: 10px 16px; border-radius: 12px; background: var(--brand); color:#061017; font-weight:700; box-shadow: 0 0 0 0 var(--ring); transition: box-shadow .2s ease, transform .06s ease; }
.btn:hover { text-decoration:none; box-shadow: 0 0 0 6px var(--ring); transform: translateY(-1px); }
.btn.secondary { background: #1b2635; color: var(--ink); border: 1px solid #2b3a50; }

/* Normalize <button class="btn"> to match <a class="btn"> */
button.btn {
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
}
button.btn:focus-visible {
  box-shadow: 0 0 0 6px var(--ring);
}

main { padding: 28px 0 56px; }
.card { background: var(--panel); border: 1px solid #1a1d24; border-radius: 16px; padding: 20px; margin: 18px 0; }
.card h2 { margin-top:0; }
.quick-facts { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 6px 18px; padding-left: 18px; }

.grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 14px; }
.project { padding: 14px; border: 1px solid #222837; border-radius: 12px; background: #0f1217; }
.project h3 { margin:0 0 6px; font-size: 18px; }
.tags { display:flex; flex-wrap:wrap; gap:6px; margin-top: 8px; }
.tag { padding: 2px 8px; border-radius: 999px; background:#172233; color:#b7c7db; font-size: 12px; border: 1px solid #24334a; }

.list { display:grid; gap: 10px; }
.item { padding: 12px; border: 1px solid #222837; border-radius: 12px; background: #0f1217; }
.item a { color: var(--ink); }
.item .sub { color: var(--muted); font-size: 14px; }

.more { margin-top: 10px; }

.site-footer { border-top: 1px solid #1a1d24; padding: 16px 0; color: var(--muted); font-size: 14px; }
.site-footer .sep { margin: 0 8px; opacity: .5; }


/* --- Bot modal --- */
.bot-modal {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0,0,0,.45);
  z-index: 9998;
}

.bot-modal.open { display: block; }

.bot-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(520px, calc(100vw - 36px));
  height: min(640px, calc(100vh - 36px));
  background: var(--panel);
  border: 1px solid #1a1d24;
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
}

.bot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid #1a1d24;
}

.bot-title { font-weight: 800; }

.bot-messages {
  flex: 1;
  padding: 12px;
  overflow: auto;
}

.bot-form {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid #1a1d24;
}

.bot-input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #222837;
  background: #0f1217;
  color: var(--ink);
}

.bot-input::placeholder { color: var(--muted); }



/* --- Bot chat bubbles --- */
.bot-bubble {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #222837;
  background: #0f1217;
  color: var(--ink);
  max-width: 90%;
  white-space: pre-wrap;
  margin: 0 0 10px 0;
}

.bot-bubble.user {
  margin-left: auto;
  border-color: #2b3a50;
  background: color-mix(in oklab, var(--brand), #0f1217 78%);
  color: #061017;
}

.bot-bubble.assistant {
  margin-right: auto;
  background: #0f1217;
}


/* --- Bot modal: mobile responsiveness --- */
@media (max-width: 600px) {

  /* General mobile spacing */
  .container { padding: 0 16px; }         /* a little more breathing room */
  .hero { padding: 44px 0 22px; }         /* slightly tighter */

  /* Full-screen sheet on phones */
  .bot-panel {
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;

    /* iPhone safe areas (home indicator) */
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* iPhone safe areas (notch) */
  .bot-header {
    padding: 14px;
    padding-top: calc(14px + env(safe-area-inset-top));
  }

  .bot-messages { padding: 14px; }

  .bot-form {
    padding: 12px;
    gap: 8px;
  }

  /* Prevent iOS zoom on focus */
  .bot-input { font-size: 16px; }

  /* Make buttons easier to tap */
  .bot-form .btn,
  .bot-close {
    padding: 12px 14px;
  }
}
