/*
Theme Name: Paul Pisig
Theme URI: https://paulpisig.com
Author: Paul Andrew Pisig
Description: Personal live feed theme for paulpisig.com. A single-column "tweet" style timeline with a lightweight commenter account system.
Version: 1.0
Text Domain: paulpisig
*/

/* ==========================================================================
   DESIGN TOKENS
   Palette: sky blue as the voice, warm orange as the pulse/signal color.
   Kept intentionally quiet — one accent per moment, never both shouting.
   ========================================================================== */
:root {
  --sky: #1C93D6;        /* primary — links, name, primary actions */
  --sky-deep: #14719F;   /* hover/active state of primary */
  --sky-tint: #EAF6FD;   /* card hover / subtle fills */
  --sky-pale: #F5FBFE;   /* page background */
  --orange: #F2762E;     /* the one accent: live indicator, new-post pulse, CTAs that matter */
  --orange-deep: #D45F1B;
  --ink: #10233A;        /* primary text — deep blue-charcoal, not pure black */
  --ink-soft: #4A6178;   /* secondary text, timestamps, meta */
  --line: #DCEAF3;       /* hairline borders */
  --white: #FFFFFF;
  --radius: 14px;
  --radius-sm: 9px;
  --font-display: 'Quicksand', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Quicksand', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 600px;
}

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

body.paulpisig {
  margin: 0;
  background: var(--sky-pale);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--sky); text-decoration: none; }
a:hover { color: var(--sky-deep); }

img, video { max-width: 100%; display: block; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 251, 254, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
}

.brand__logo {
  height: 46px;
  width: auto;
  display: block;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #FFFFFF;
  background: #D6002A;
  border: 1px solid #A8001F;
  padding: 5px 11px;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(214, 0, 42, 0.35);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FFFFFF;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.85); }
  70%  { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.feed-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px 80px;
}

.feed-intro {
  padding: 36px 4px 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
  text-align: center;
}

.feed-intro__avatar-wrap {
  display: inline-block;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky) 0%, var(--orange) 100%);
  box-shadow: 0 6px 18px rgba(16, 35, 58, 0.16);
}

.feed-intro__avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--sky-pale);
}

.feed-intro__bio {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  margin: 40px auto 0;
  max-width: 460px;
}

.feed-intro .live-pill {
  margin-top: 22px;
}

.feed-section-label {
  padding: 4px 4px 20px;
  text-align: center;
}

.pill-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--sky-deep);
  background: var(--sky-tint);
  border: 1px solid var(--line);
  padding: 5px 13px;
  border-radius: 999px;
}

.feed-intro p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 14px;
}

/* ==========================================================================
   TWEET CARD — thought bubble
   ========================================================================== */
.tweet {
  position: relative;
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 18px 20px 22px;
  margin: 0 6px 30px;
  box-shadow: 0 3px 14px rgba(16, 35, 58, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.tweet:hover {
  box-shadow: 0 6px 20px rgba(16, 35, 58, 0.09);
}

/* the trailing "thought" dots, drifting down toward the reader */
.tweet::after,
.tweet::before {
  content: "";
  position: absolute;
  left: 34px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(16, 35, 58, 0.05);
}

.tweet::after  { width: 16px; height: 16px; bottom: -11px; left: 30px; }
.tweet::before { width: 9px;  height: 9px;  bottom: -22px; left: 21px; }

.tweet.is-new {
  animation: slideIn 0.4s ease;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px var(--sky-tint), 0 6px 20px rgba(16, 35, 58, 0.09);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tweet__body { min-width: 0; }

.tweet__meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.tweet__time {
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.tweet__text {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 15px;
  font-style: italic;
  font-weight: 400;
  margin: 2px 0 8px;
}

.tweet__media {
  display: grid;
  gap: 4px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid var(--line);
}

.tweet__media.count-1 { grid-template-columns: 1fr; }
.tweet__media.count-2 { grid-template-columns: 1fr 1fr; }
.tweet__media.count-3 { grid-template-columns: 1fr 1fr; }
.tweet__media.count-4 { grid-template-columns: 1fr 1fr; }
.tweet__media img, .tweet__media video { width: 100%; height: 100%; object-fit: cover; max-height: 340px; }

.tweet__actions {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  color: var(--ink-soft);
  font-size: 13px;
}

.tweet__action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  color: var(--ink-soft);
}

.tweet__action:hover { color: var(--sky); }

/* ==========================================================================
   COMMENTS
   ========================================================================== */
.comments {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  display: none;
}

.comments.is-open { display: block; }

.comment {
  display: flex;
  gap: 9px;
  padding: 8px 0;
}

.comment__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink-soft);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.comment__bubble {
  background: var(--sky-pale);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  font-size: 13.5px;
}

.comment__name { font-weight: 700; margin-right: 4px; }
.comment__time { color: var(--ink-soft); font-size: 11.5px; margin-top: 2px; }

.comment-form { display: flex; gap: 8px; margin-top: 10px; }

.comment-form input[type=text] {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13.5px;
  font-family: inherit;
  background: var(--white);
}

.comment-form input[type=text]:focus {
  outline: none;
  border-color: var(--sky);
}

.btn {
  background: var(--sky);
  color: #fff;
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 600;
  font-size: 13.5px;
  transition: background 0.15s ease;
}

.btn:hover { background: var(--sky-deep); }
.btn.btn--orange { background: var(--orange); }
.btn.btn--orange:hover { background: var(--orange-deep); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.signin-prompt {
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--sky-tint);
  border: 1px solid var(--line);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

.signin-prompt a { font-weight: 600; }

/* ==========================================================================
   AUTH WIDGET
   ========================================================================== */
.auth-widget {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-widget .btn { padding: 7px 14px; font-size: 13px; }

.auth-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.auth-chip .avatar-mini {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--sky); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}

.auth-chip button {
  background: none; color: var(--ink-soft); font-size: 12px; text-decoration: underline;
}

/* ==========================================================================
   MODAL (signup / login)
   ========================================================================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(16, 35, 58, 0.45);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px;
  z-index: 100;
}

.modal-overlay.is-open { display: flex; }

.modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 50px rgba(16, 35, 58, 0.25);
}

.modal h2 {
  font-family: var(--font-display);
  font-size: 19px;
  margin: 0 0 4px;
}

.modal p.sub { color: var(--ink-soft); font-size: 13px; margin: 0 0 16px; }

.modal label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 12px 0 5px;
}

.modal input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}

.modal input:focus { outline: none; border-color: var(--sky); }

.modal .btn { width: 100%; margin-top: 18px; padding: 11px; font-size: 14px; }

.modal .switch {
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 14px;
}

.modal .error {
  color: var(--orange-deep);
  font-size: 12.5px;
  margin-top: 10px;
  display: none;
}

.modal .error.is-visible { display: block; }

.modal-close {
  float: right;
  background: none;
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1;
}

/* empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
}

.empty-state strong { color: var(--ink); display: block; margin-bottom: 4px; font-family: var(--font-display); }

/* focus visibility for a11y */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ==========================================================================
   CASUAL-COPY DETERRENTS
   Not real security — this only discourages right-click/long-press/drag
   saving and text selection. Does not and cannot block OS screenshots.
   ========================================================================== */
body.paulpisig {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

body.paulpisig input,
body.paulpisig textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

body.paulpisig img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .live-dot, .tweet.is-new { animation: none; }
}

@media (max-width: 420px) {
  .brand__logo { height: 36px; }
}
