/* Personal site for Kazi Paruaz Prince. Hand built, no frameworks. */

:root {
  --paper: #faf7f1;
  --ink: #1e1a14;
  --muted: #6e6355;
  --rule: #e3dccb;
  --pine: #0f3d2e;
  --pine-deep: #0a2b21;
  --gold: #c9a227;
  --card: #ffffff;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

/* Hero */

.hero {
  background: var(--pine-deep);
  color: #f4efe3;
  padding: 4.5rem 1.5rem 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--gold);
}

.hero-inner {
  max-width: 42rem;
  margin: 0 auto;
}

.kicker {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tagline {
  margin: 0 0 2rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #d8d0bd;
  max-width: 34rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--pine-deep);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.btn.ghost {
  background: transparent;
  color: #f4efe3;
  border: 1px solid rgba(244, 239, 227, 0.45);
}

.btn.ghost:hover {
  border-color: #f4efe3;
  box-shadow: none;
}

/* Page body */

.page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}

section {
  margin-bottom: 3rem;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  margin: 0 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--pine);
  display: inline-block;
}

p { margin: 0 0 1rem; }

/* Experience */

.job {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--pine);
  border-radius: 0.5rem;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(30, 26, 20, 0.06);
}

.job-head h3 {
  margin: 0 0 0.15rem;
  font-size: 1.05rem;
}

.where {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

.job p:last-child { margin-bottom: 0; }

/* Certifications */

.pills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pills li {
  background: var(--pine);
  color: #f4efe3;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* Contact section */

.contact {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(30, 26, 20, 0.06);
}

.contact .btn.ghost {
  color: var(--pine-deep);
  border-color: rgba(15, 61, 46, 0.4);
}

.contact .btn.ghost:hover {
  border-color: var(--pine-deep);
}

/* Footer */

footer {
  border-top: 1px solid var(--rule);
  padding: 1.5rem;
  text-align: center;
}

footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  .hero { padding: 3.5rem 1.25rem 2.75rem; }
  .page { padding: 2.25rem 1.25rem 1.5rem; }
  body { font-size: 16px; }
}

/* Chat widget */
#chatFab {
  position: fixed; right: 1.25rem; bottom: 1.25rem;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--pine); border: none; cursor: pointer;
  box-shadow: 0 4px 16px rgba(10, 43, 33, 0.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 50; padding: 0;
}
#chatFab:hover { background: var(--pine-deep); }
#chatFab svg { width: 28px; height: 28px; fill: #f4efe3; }
#chatPanel {
  position: fixed; right: 1.25rem; bottom: 5.25rem;
  width: 340px; max-width: calc(100vw - 2.5rem);
  background: var(--card); border: 1px solid var(--rule); border-radius: 0.9rem;
  box-shadow: 0 12px 40px rgba(10, 43, 33, 0.25);
  z-index: 50; overflow: hidden;
}
#chatPanel[hidden] { display: none; }
.chat-head {
  background: var(--pine); color: #f4efe3;
  padding: 0.8rem 1rem; display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 1rem;
}
.chat-head button {
  background: none; border: none; color: #f4efe3;
  font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 0 0.2rem;
}
.chat-log {
  max-height: 260px; overflow-y: auto; padding: 1rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.chat-msg {
  padding: 0.6rem 0.9rem; border-radius: 0.9rem;
  font-size: 0.92rem; line-height: 1.5; max-width: 92%;
  overflow-wrap: break-word;
}
.chat-msg.me { background: var(--pine); color: #f4efe3; align-self: flex-end; }
.chat-msg.sys { background: var(--paper); color: var(--muted); align-self: center; font-size: 0.85rem; text-align: center; }
#chatForm {
  padding: 0.9rem; border-top: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 0.6rem;
}
#chatForm input, #chatForm textarea {
  font: inherit; font-size: 0.92rem; padding: 0.6rem 0.8rem;
  border: 1px solid var(--rule); border-radius: 0.6rem;
  background: var(--paper); color: var(--ink); width: 100%;
}
#chatForm input:focus, #chatForm textarea:focus { outline: 2px solid var(--pine); outline-offset: -1px; }
#chatForm textarea { resize: vertical; min-height: 64px; }
#chatForm button[type="submit"] {
  background: var(--gold); color: var(--pine-deep); border: none; border-radius: 999px;
  padding: 0.65rem; font-weight: 600; font-size: 0.95rem; cursor: pointer;
}
#chatForm button[type="submit"]:disabled { opacity: 0.55; cursor: default; }
