/* AI Adjacent – main stylesheet */

:root {
  --bg: #050607;
  --surface: #0B0C0F;
  --white: #FFFFFF;
  --indigo: #5C6FFF;
  --accent: #9DECF9;
  --accent-warm: #F2C14F;
  --text: #E2E8F0;
  --text-muted: #94A3B8;
  --border: #1E2530;
  --grid: #1A1D24;
  --max-width: 800px;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("/linkedin-bg-2.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.24;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 78%, rgba(0, 0, 0, 0.22) 100%);
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 78%, rgba(0, 0, 0, 0.22) 100%);
  mix-blend-mode: screen;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(20, 24, 32, 0.06) 0 1px, transparent 1px 52px),
    repeating-linear-gradient(90deg, rgba(20, 24, 32, 0.06) 0 1px, transparent 1px 52px),
    linear-gradient(110deg, rgba(92, 111, 255, 0.16) 0%, rgba(92, 111, 255, 0) 42%);
  background-size: 100% 100%, 100% 100%, 100% 100%;
  background-repeat: repeat, repeat, no-repeat;
  background-position: 0 0, 0 0, 0 0;
  opacity: 0.34;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 0.2) 100%);
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 0.2) 100%);
  z-index: 0;
}

.dynamic-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.74;
}

/* ---- Layout ---- */
.site-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
  border-left: 1px solid rgba(26, 29, 36, 0.35);
  border-right: 1px solid rgba(26, 29, 36, 0.35);
}

/* ---- Header ---- */
.site-header {
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--grid);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-logo-image {
  width: 64px;
  height: 64px;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
  border: 1px solid rgba(92, 111, 255, 0.32);
  background: rgba(4, 8, 18, 0.82);
  box-shadow: 0 0 20px rgba(92, 111, 255, 0.38);
  animation: logoBootGlow 1800ms ease-out 1 forwards;
}

.site-wordmark {
  display: grid;
  grid-template-columns: auto 10px auto;
  grid-template-rows: auto auto;
  column-gap: 5px;
  row-gap: 2px;
  line-height: 1;
  font-family: var(--font-mono);
  letter-spacing: 0.07em;
  color: #D8E1FA;
}

.site-wordmark-slash {
  grid-column: 2;
  grid-row: 1 / 3;
  justify-self: center;
  align-self: stretch;
  width: 2px;
  min-height: 30px;
  background: linear-gradient(180deg, rgba(232, 238, 255, 0.95) 0%, rgba(170, 187, 244, 0.85) 100%);
  transform: rotate(18deg);
  transform-origin: center;
  box-shadow: 0 0 8px rgba(158, 180, 255, 0.24);
}

.site-wordmark-top {
  grid-column: 1;
  grid-row: 1;
  font-size: 14px;
  font-weight: 700;
  color: #F0F4FF;
  justify-self: end;
}

.site-wordmark-bottom {
  grid-column: 3;
  grid-row: 2;
  font-size: 12px;
  font-weight: 700;
  color: #F0F4FF;
  justify-self: start;
}

.site-nav { display: flex; gap: 20px; }
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  transition: color 0.15s;
}
.site-nav a:hover { color: var(--accent); }

main {
  border-top: 1px solid rgba(26, 29, 36, 0.35);
  border-bottom: 1px solid rgba(26, 29, 36, 0.35);
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--grid);
  padding: 32px 0;
  margin-top: 64px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: #666666;
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 14px;
  column-gap: 14px;
  align-items: start;
}

.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.footer-system-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin: 0;
  align-self: start;
}

.social-icon-link {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(108, 124, 170, 0.42);
  border-radius: 6px;
  background: rgba(7, 11, 18, 0.55);
  color: #97c8d9;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.social-icon-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.social-icon-link:hover {
  border-color: rgba(157, 236, 249, 0.58);
  background: rgba(9, 15, 25, 0.75);
  color: #CFE8EE;
  text-decoration: none;
}

.footer-links {
  grid-column: 1 / -1;
  justify-self: center;
  text-align: center;
  align-self: end;
}

.site-footer .origin-link {
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: text-shadow 0.2s ease, border-color 0.2s ease;
}

.site-footer .origin-link:hover {
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
}

/* ---- Hero / issue meta ---- */
.issue-hero {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.issue-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent-warm);
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 12px;
}

.issue-hero h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 10px;
}

.issue-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.issue-description {
  margin-top: 14px;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 640px;
}

/* ---- Issue content ---- */
.issue-content h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.issue-content h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  margin: 28px 0 8px;
}

.issue-content p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 14px;
}

.issue-content ul, .issue-content ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.issue-content li {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 12px;
}

.issue-content a {
  color: var(--accent);
  text-decoration: none;
}

.issue-content a:hover { text-decoration: underline; }

.issue-content strong { color: var(--white); font-weight: 600; }
.issue-content em { color: var(--text-muted); }

.issue-content code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--accent);
}

.issue-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 16px;
}

.issue-content pre code {
  background: none;
  padding: 0;
  font-size: 13px;
  color: var(--text);
}

.issue-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ---- Index page ---- */
.index-header {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.index-header h1 {
  font-size: 27px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0;
  margin-bottom: 10px;
}

.index-header p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 760px;
}

.issue-list { list-style: none; }

.issue-list-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.issue-list-item:last-child { border-bottom: none; }

.issue-list-item.subscribe-list-item {
  padding: 26px 0;
}

.issue-list-item .badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 8px;
}

.badge-weekly { color: var(--bg); background: var(--accent); }
.badge-daily { color: var(--bg); background: var(--accent-warm); }
.badge-special { color: var(--bg); background: var(--white); }

.issue-list-item h2 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.issue-list-item h2 a {
  color: var(--white);
  text-decoration: none;
}

.issue-list-item h2 a:hover { color: var(--accent); }

.issue-list-item .desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.issue-list-item .date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.pagination {
  margin: 20px 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.pagination-link {
  color: #9CB2E8;
  text-decoration: none;
}

.pagination-link:hover {
  color: var(--white);
}

.pagination-disabled {
  color: #4C566E;
}

.pagination-state {
  color: #7E8CA9;
}

/* ---- Subscribe form ---- */
.subscribe-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
  margin: 48px 0;
  text-align: center;
}

.subscribe-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.subscribe-section p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.subscribe-form-main-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.subscribe-form input[type="email"] {
  flex: 1;
  padding: 10px 14px;
  background: #05070B;
  border: 1px solid #2C3242;
  border-radius: 5px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  color: var(--white);
  font-size: 14px;
  outline: none;
}

.subscribe-form input[type="email"]::placeholder {
  color: #7784B2;
}

.subscribe-form select {
  padding: 10px 12px;
  min-width: 108px;
  background: #05070B;
  border: 1px solid #2C3242;
  border-radius: 5px;
  font-family: var(--font-mono);
  color: #C9D3F7;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  outline: none;
}

.subscribe-form select:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 1px rgba(92, 111, 255, 0.45), 0 0 10px rgba(92, 111, 255, 0.24);
}

.turnstile-wrap {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  border: 0;
}

.subscribe-actions-row {
  display: flex;
  justify-content: center;
}

.subscribe-form input[type="email"]:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 1px rgba(92, 111, 255, 0.45), 0 0 14px rgba(92, 111, 255, 0.32);
}

.subscribe-form button {
  padding: 10px 20px;
  background: var(--indigo);
  color: var(--white);
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(92, 111, 255, 0.35), 0 0 28px rgba(92, 111, 255, 0.12);
  transition: opacity 0.15s, transform 0.15s;
}

.subscribe-form button:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.subscribe-page-shell {
  padding: 56px 0 36px;
}

.subscribe-page-shell .subscribe-section {
  margin: 0;
}

/* ---- Submit tip form ---- */
.tip-section {
  margin: 24px 0 64px;
}

.tip-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(10, 12, 17, 0.84);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.tip-form label {
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: #9BA7C7;
}

.tip-form input,
.tip-form textarea {
  width: 100%;
  padding: 10px 12px;
  background: #05070B;
  border: 1px solid #2C3242;
  border-radius: 5px;
  color: var(--white);
  font-size: 14px;
  font-family: var(--font-mono);
  outline: none;
}

.tip-form textarea {
  min-height: 170px;
  resize: vertical;
  line-height: 1.6;
}

.tip-turnstile-wrap {
  display: flex;
  justify-content: center;
  margin-top: 6px;
  margin-bottom: 4px;
}

.tip-form input:focus,
.tip-form textarea:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 1px rgba(92, 111, 255, 0.45), 0 0 12px rgba(92, 111, 255, 0.2);
}

.tip-form button {
  margin-top: 8px;
  align-self: center;
  padding: 10px 16px;
  background: #1D294B;
  border: 1px solid #3A4A7E;
  border-radius: 5px;
  color: #E6EDFF;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 13px;
  cursor: pointer;
}

.tip-form button:hover {
  border-color: #5C6FFF;
  color: var(--white);
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-32 { margin-top: 32px; }
.mb-32 { margin-bottom: 32px; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .site-wrapper { padding: 0 16px; }
  .subscribe-form-main-row { flex-direction: column; }
  .site-header { flex-direction: column; align-items: flex-start; }
  .site-logo { gap: 10px; }
  .site-logo-image { width: 56px; height: 56px; }
  .site-wordmark-top { font-size: 13px; }
  .site-wordmark-bottom { font-size: 11px; }
  .site-wordmark {
    grid-template-columns: auto 8px auto;
    column-gap: 4px;
  }
  .site-wordmark-slash { min-height: 26px; }
  .site-footer {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }
  .footer-social { justify-content: flex-start; }
  .footer-links { align-self: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .dynamic-bg-canvas { opacity: 0.35; }
  .site-logo-image { animation: none; box-shadow: 0 0 10px rgba(92, 111, 255, 0.18); }
}

@keyframes logoBootGlow {
  0% {
    box-shadow: 0 0 36px rgba(92, 111, 255, 0.75), 0 0 52px rgba(92, 111, 255, 0.4);
    border-color: rgba(92, 111, 255, 0.64);
  }
  100% {
    box-shadow: 0 0 4px rgba(92, 111, 255, 0.1);
    border-color: rgba(92, 111, 255, 0.22);
  }
}
