/* Digital Jeroen — design system
 * Dark techy theme with magenta accent, inspired by TrueLime 2026.
 */

:root {
  /* Fonts */
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-display: "Poppins", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, sans-serif;

  /* Dark = default */
  --bg:        #0A0A0B;
  --bg-elev:   #131316;
  --bg-card:   #18181C;
  --bg-line:   rgba(255,255,255,0.08);
  --fg:        #F4F4F5;
  --fg-muted:  #A1A1AA;
  --fg-dim:    #71717A;

  --accent:        #E62579;
  --accent-hot:    #FF3D8B;
  --accent-soft:   rgba(230,37,121,0.14);
  --accent-line:   rgba(230,37,121,0.40);

  /* Source colours */
  --src-own:        #E62579;
  --src-devto:      #67D5F4;
  --src-frank:      #F4A361;
  --src-presentation: #C0D000;

  /* Kentico brand */
  --kentico-orange: #F05A22;

  --grid-line: rgba(255,255,255,0.04);

  --radius-card: 14px;
  --radius-pill: 999px;
  --radius-input: 12px;

  --gutter: clamp(20px, 4vw, 56px);
  --maxw:   1200px;
}

html[data-theme="light"] {
  --bg:        #FAFAF9;
  --bg-elev:   #FFFFFF;
  --bg-card:   #FFFFFF;
  --bg-line:   rgba(0,0,0,0.08);
  --fg:        #0A0A0B;
  --fg-muted:  #52525B;
  --fg-dim:    #71717A;
  --grid-line: rgba(0,0,0,0.045);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-weight: 300;
  font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100vh; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
  box-sizing: border-box;
}

.bg-grid {
  background-image: radial-gradient(circle, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Skip link */
.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--accent); color: #0A0A0B;
  padding: 10px 16px; border-radius: 8px;
  font-family: var(--font-mono); font-size: 13px;
  z-index: 100;
}
.skip:focus { left: 12px; }

/* ── Typography ───────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--fg-muted);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 12px; height: 12px;
  background: var(--accent);
  border-radius: 0;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'><path d='M 20 0 L 0 0 L 0 50 L 20 50 L 20 20 L 50 20 L 50 0 L 20 0 Z'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'><path d='M 20 0 L 0 0 L 0 50 L 20 50 L 20 20 L 50 20 L 50 0 L 20 0 Z'/></svg>") no-repeat center / contain;
}

.h-display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5.4vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0;
}
.h-display .accent { color: var(--accent); }

.h-section {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}

.lede {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 62ch;
}

.mono { font-family: var(--font-mono); }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 44px; padding: 0 20px;
  font-family: var(--font-body); font-weight: 500; font-size: 14px;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  cursor: pointer; transition: transform .15s ease, background .2s ease,
                              border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-hot); border-color: var(--accent-hot); }

.btn--ghost {
  background: transparent; color: var(--fg);
  border-color: var(--bg-line);
}
.btn--ghost:hover { border-color: var(--fg); }

.btn--soft {
  background: var(--accent-soft); color: var(--accent);
  border-color: var(--accent-line);
}

/* ── Card ─────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-line);
  border-radius: var(--radius-card);
  padding: 22px;
}

/* ── Section frame ────────────────────────────────────────────────── */
section.s {
  padding: clamp(56px, 7vw, 96px) 0;
  border-bottom: 1px solid var(--bg-line);
}
.section-head {
  display: flex; flex-direction: column; gap: 14px;
  max-width: 720px; margin-bottom: 40px;
}
.section-head--row {
  flex-direction: row; align-items: flex-end; justify-content: space-between;
  max-width: 100%; gap: 32px; flex-wrap: wrap;
}

/* ── Header ───────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(10,10,11,0.72);
  border-bottom: 1px solid var(--bg-line);
}
html[data-theme="light"] .site-header {
  background: rgba(250,250,249,0.78);
}
.site-header .wrap {
  height: 64px; display: flex; align-items: center; gap: 20px;
}
.site-header__mark {
  display: inline-flex; align-items: center; gap: 12px; flex: none;
}
.site-header__mark-image {
  width: 40px; height: 40px; flex: none;
  display: block; object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
.site-header__mark-text {
  font-family: var(--font-display); font-weight: 600;
  font-size: 15px; letter-spacing: -0.01em;
}
.site-header__nav {
  flex: 1; display: flex; justify-content: center; gap: 4px;
}
.site-header__nav a {
  font-family: var(--font-body); font-weight: 500;
  font-size: 14px; color: var(--fg-muted);
  padding: 8px 14px; border-radius: 999px;
  transition: color .15s, background .15s;
}
.site-header__nav a:hover {
  color: var(--fg); background: var(--bg-line);
}
.site-header__icon-btn {
  width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid var(--bg-line); background: transparent;
  display: grid; place-items: center;
  color: var(--fg-muted); cursor: pointer;
  transition: color .15s, border-color .15s;
}
.site-header__icon-btn:hover {
  color: var(--fg); border-color: var(--fg);
}

/* Format toggle (human / markdown) */
.site-header__format-toggle {
  display: inline-flex; align-items: center;
  background: var(--bg-elev); border: 1px solid var(--bg-line);
  border-radius: var(--radius-pill); padding: 3px; gap: 2px;
}
.format-toggle__btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  padding: 6px 11px; border-radius: var(--radius-pill);
  border: none; background: transparent; color: var(--fg-muted);
  cursor: pointer; transition: background .15s, color .15s;
}
.format-toggle__btn:hover { color: var(--fg); }
.format-toggle__btn--active {
  background: var(--accent); color: #fff; font-weight: 600;
}
.format-toggle__btn--active:hover { color: #fff; }

/* Theme toggle icon visibility */
html[data-theme="dark"] .theme-icon--dark { display: block; }
html[data-theme="dark"] .theme-icon--light { display: none; }
html[data-theme="light"] .theme-icon--dark { display: none; }
html[data-theme="light"] .theme-icon--light { display: block; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  position: relative; padding: 72px 0 80px;
  border-bottom: 1px solid var(--bg-line);
}
.hero .wrap {
  display: grid; grid-template-columns: 1.45fr 1fr; gap: 56px; align-items: center;
  overflow: hidden;
}
.hero__content {
  display: flex; flex-direction: column; gap: 22px;
  min-width: 0;
}

/* ── DJ Chat Panel ─────────────────────────────────────────────── */
.dj-chat {
  background: var(--bg-card);
  border: 1px solid var(--bg-line);
  border-radius: 16px;
  box-shadow: 0 18px 50px -32px rgba(0,0,0,0.45);
  display: flex; flex-direction: column;
  overflow: hidden;
  margin-top: 8px;
}
.dj-chat__header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--bg-line);
}
.dj-chat__header-info { flex: 1; line-height: 1.25; }
.dj-chat__header-name {
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
}
.dj-chat__header-role {
  font-size: 12px; color: var(--fg-muted);
}
.dj-avatar {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 700;
  letter-spacing: -0.02em;
}
.dj-avatar--sm { width: 28px; height: 28px; font-size: 11.5px; }
.dj-avatar-user {
  width: 28px; height: 28px; border-radius: 999px; flex: none;
  border: 1px solid var(--bg-line); overflow: hidden;
  background: var(--bg-elevated, rgba(255,255,255,0.06));
}
.dj-iconbtn {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--fg-muted);
  border: 1px solid var(--bg-line);
  transition: color .15s, border-color .15s;
}
.dj-iconbtn:hover { color: var(--accent); border-color: var(--accent-line); }

/* Thread */
.dj-thread {
  padding: 18px 16px; display: flex; flex-direction: column; gap: 16px;
  max-height: 380px; overflow-y: auto;
}
.dj-thread::-webkit-scrollbar { width: 8px; }
.dj-thread::-webkit-scrollbar-thumb { background: var(--bg-line); border-radius: 4px; }

/* Messages */
.dj-msg {
  display: flex; gap: 10px; align-items: flex-end;
  animation: dj-rise .28s ease both;
}
.dj-msg--user { flex-direction: row-reverse; }
.dj-bubble-wrap {
  max-width: 82%; display: flex; flex-direction: column;
  align-items: flex-start; gap: 8px;
}
.dj-bubble-wrap--user { align-items: flex-end; }
.dj-bubble {
  padding: 11px 14px;
  font-size: 14.5px; line-height: 1.55;
  word-wrap: break-word; overflow-wrap: break-word;
}
.dj-bubble--dj {
  border-radius: 4px 14px 14px 14px;
  background: var(--bg-elevated, rgba(255,255,255,0.06));
  color: var(--fg);
  border: 1px solid var(--bg-line);
}
.dj-bubble--user {
  border-radius: 14px 4px 14px 14px;
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent);
}
.dj-bubble p { margin: 0 0 10px; }
.dj-bubble p:last-child { margin-bottom: 0; }
.dj-bubble a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.dj-bubble--user a { color: #fff; }
.dj-bubble strong { font-weight: 600; color: var(--accent); }
.dj-bubble--user strong { color: #fff; }
.dj-bubble code {
  font-family: var(--font-mono); font-size: 13px;
  background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 4px;
}
.dj-bubble pre {
  background: rgba(0,0,0,0.3); border: 1px solid var(--bg-line);
  border-radius: 8px; padding: 12px 14px; overflow-x: auto; margin: 10px 0;
}
.dj-bubble pre code { background: none; padding: 0; }
.dj-bubble ul, .dj-bubble ol { margin: 0 0 10px; padding-left: 20px; }
.dj-bubble li { margin-bottom: 4px; }

/* Streaming cursor */
.dj-cursor {
  display: inline-block; width: 6px; height: 15px; margin-left: 2px;
  background: var(--accent); vertical-align: -3px;
  animation: dj-blink 1s steps(2, end) infinite;
}

/* Thinking dots */
.dj-thinking-bubble {
  display: inline-flex; gap: 5px; align-items: center;
  padding: 13px 16px;
}
.dj-dot {
  width: 7px; height: 7px; border-radius: 999px; background: var(--accent);
  display: inline-block;
  animation: dj-bounce 1.2s infinite ease-in-out;
}
.dj-dot:nth-child(2) { animation-delay: 0.16s; }
.dj-dot:nth-child(3) { animation-delay: 0.32s; }

/* Follow-up chips */
.dj-follow {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.dj-follow-btn {
  font-family: var(--font-body); font-size: 12.5px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-line); cursor: pointer;
  transition: background .15s;
}
.dj-follow-btn:hover { background: var(--accent-line); }

/* Sources inside bubble */
.dj-sources { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--bg-line); }
.dj-sources__title {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--fg-muted); margin-bottom: 6px;
}
.dj-sources ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.dj-sources a { color: var(--accent); font-size: 13px; text-decoration: none; }
.dj-sources a:hover { text-decoration: underline; }
.dj-sources a::after { content: ' →'; font-size: 12px; }

/* Email section */
.dj-emailbox { margin-top: 4px; }
.dj-email-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 12.5px;
  padding: 8px 14px; border-radius: 999px;
  background: transparent; color: var(--fg-muted);
  border: 1px dashed var(--bg-line); cursor: pointer;
}
.dj-email-toggle:hover { border-color: var(--accent-line); color: var(--accent); }
.dj-email-form {
  padding: 14px; border-radius: 12px;
  background: var(--bg-elevated, rgba(255,255,255,0.06));
  border: 1px solid var(--bg-line);
  display: flex; flex-direction: column; gap: 10px;
}
.dj-email-input {
  flex: 1; min-width: 180px; height: 40px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--bg-line);
  background: var(--bg-card); color: var(--fg);
  font-family: var(--font-body); font-size: 14px; outline: none;
}
.dj-email-input:focus { border-color: var(--accent); }
.dj-email-input::placeholder { color: var(--fg-dim); }
.dj-email-sent {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  color: var(--fg); font-size: 13.5px;
}

/* Composer */
.dj-chat__composer {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 10px 10px 16px;
  border-top: 1px solid var(--bg-line);
}
.dj-chat__composer input {
  flex: 1; background: transparent; border: 0; outline: 0;
  color: var(--fg); font-family: var(--font-body);
  font-size: 15px; padding: 8px 0; caret-color: var(--accent);
}
.dj-chat__composer input::placeholder { color: var(--fg-dim); }
.dj-chat__send {
  height: 38px; width: 38px; padding: 0; border-radius: 999px;
  flex: none; display: grid; place-items: center;
}
.dj-chat__send:disabled { opacity: 0.45; }

/* Disclaimer */
.dj-chat__disclaimer {
  padding: 9px 16px; border-top: 1px solid var(--bg-line);
  background: var(--bg-elevated, rgba(255,255,255,0.06));
  font-size: 11px; color: var(--fg-dim); line-height: 1.5;
  display: flex; align-items: center; gap: 7px;
}

/* Animations */
@keyframes dj-blink { 50% { opacity: 0; } }
@keyframes dj-bounce { 0%,80%,100% { transform: translateY(0); opacity:.4 } 40% { transform: translateY(-4px); opacity:1 } }
@keyframes dj-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Profile card in hero */
.hero__profile {
  position: relative;
  display: flex; justify-content: center; align-items: center;
  max-width: 100%;
  overflow: hidden;
}
.hero__profile-card {
  position: relative;
  width: min(100%, 420px);
  max-width: 100%;
  aspect-ratio: 3/4;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--bg-line);
  background: var(--bg-card);
  box-shadow: 0 40px 120px -40px rgba(230,37,121,0.45);
}
.hero__profile-card img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: center 22%; display: block;
}
.hero__profile-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 32px 22px 18px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
  color: #fff;
}
.hero__profile-name {
  font-family: var(--font-display); font-weight: 700;
  font-size: 22px; line-height: 1.1; letter-spacing: -0.015em;
}
.hero__profile-role {
  font-family: var(--font-mono); font-size: 12px;
  margin-top: 6px; color: rgba(255,255,255,0.78);
}

/* ── Post grid ────────────────────────────────────────────────────── */
.post-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
@media (max-width: 980px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
  display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--bg-line);
  border-radius: 14px; overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.post-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }

.post-card__cover {
  position: relative; aspect-ratio: 16/9;
}
.post-card__cover-placeholder {
  position: absolute; inset: 0;
}
.post-card__body {
  padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 12px;
}
.post-card__meta {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim);
  display: flex; gap: 10px; align-items: center;
}
.post-card__title {
  font: 700 18px/1.3 var(--font-display);
  margin: 0; letter-spacing: -0.01em; color: var(--fg);
}
.post-card__excerpt {
  margin: 0; font-size: 14px; line-height: 1.55; color: var(--fg-muted);
}
.post-card__link {
  margin-top: 4px; font-family: var(--font-mono); font-size: 12px;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
}

/* Source badge */
.source-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; line-height: 1.2;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
}
.source-badge--own   { border: 1px solid var(--src-own); color: var(--src-own); }
.source-badge--devto { border: 1px solid var(--src-devto); color: var(--src-devto); }
.source-badge--frank { border: 1px solid var(--src-frank); color: var(--src-frank); }

.source-badge__dot {
  width: 5px; height: 5px; border-radius: 999px;
}
.source-badge--own .source-badge__dot   { background: var(--src-own); }
.source-badge--devto .source-badge__dot { background: var(--src-devto); }
.source-badge--frank .source-badge__dot { background: var(--src-frank); }

/* External arrow indicator */
.ext-arrow {
  width: 28px; height: 28px; border-radius: 999px;
  background: rgba(0,0,0,0.55); color: #fff;
  display: grid; place-items: center;
  backdrop-filter: blur(6px);
}

/* ── Filter row ───────────────────────────────────────────────────── */
.filter-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.filter-row__label {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim);
}
.filter-btn {
  font-family: var(--font-mono); font-size: 12px;
  padding: 5px 11px; border-radius: 999px;
  background: transparent; color: var(--fg-muted);
  border: 1px solid var(--bg-line); cursor: pointer;
  transition: .15s;
}
.filter-btn:hover { border-color: var(--accent-line); color: var(--accent); }
.filter-btn--active {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
}
.filter-btn--more {
  border-style: dashed; color: var(--fg-dim);
}
.filter-btn--more:hover { color: var(--accent); border-color: var(--accent-line); }

/* ── Speaking list ────────────────────────────────────────────────── */
.speak-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 1px;
  border: 1px solid var(--bg-line); border-radius: 12px;
  overflow: hidden; background: var(--bg-card);
}
.speak-list li {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 24px; align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--bg-line);
}
.speak-list li:last-child { border-bottom: 0; }
@media (max-width: 720px) {
  .speak-list li { grid-template-columns: 1fr; gap: 10px; }
}

/* ── About ────────────────────────────────────────────────────────── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: start;
}
@media (max-width: 880px) { .about-grid { grid-template-columns: 1fr; } }

.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-top: 12px; padding-top: 24px; border-top: 1px solid var(--bg-line);
}
@media (max-width: 720px) { .stats-grid { grid-template-columns: 1fr 1fr; } }

.stats-grid__value {
  font: 700 28px/1 var(--font-display);
  letter-spacing: -0.02em; color: var(--accent);
}
.stats-grid__label {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-dim); margin-top: 6px;
}

/* ── Elsewhere ────────────────────────────────────────────────────── */
.elsewhere-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px;
}
@media (max-width: 880px) { .elsewhere-grid { grid-template-columns: 1fr; } }

.ig-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.ig-grid__item {
  position: relative; aspect-ratio: 1/1;
  border-radius: 10px; overflow: hidden;
}

.ig-embed-container {
  position: relative;
  min-height: 200px;
}
.ig-consent {
  position: absolute; inset: 0;
  background: var(--bg-elev); border-radius: 10px;
  z-index: 2; display: flex; align-items: center; justify-content: center;
}
.ig-iframe:not([src]) { display: none; }
.ig-embed-wrapper { border-radius: 10px; }
@container (max-width: 500px) {
  .ig-embed-wrapper { height: 200px; }
  .ig-iframe[src] { margin-top: -200px; }
}

/* ── Contact ──────────────────────────────────────────────────────── */
.contact-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center;
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

/* ── Footer ───────────────────────────────────────────────────────── */
.site-footer {
  padding: 56px 0 24px; border-top: 1px solid var(--bg-line);
}
.site-footer__top {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 24px; margin-bottom: 32px;
}
.site-footer__brand {
  display: flex; align-items: center; gap: 14px;
}
.site-footer__brand-image {
  width: 32px; height: 32px; flex: none;
  display: block; object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}
.site-footer__bottom {
  display: flex; justify-content: space-between;
  padding-top: 20px; border-top: 1px solid var(--bg-line);
  flex-wrap: wrap; gap: 12px;
  font-size: 12px; color: var(--fg-dim);
}
.site-footer__powered-by {
  display: inline-flex; align-items: center; gap: 8px;
}
.site-footer__powered-link {
  display: inline-flex; align-items: center;
  font-weight: 600;
  color: var(--fg-muted);
  transition: color .15s;
}
.site-footer__powered-link:hover { color: var(--accent); }
.footer-icon {
  width: 38px; height: 38px; border-radius: 999px;
  border: 1px solid var(--bg-line);
  display: grid; place-items: center;
  color: var(--fg-muted);
  transition: color .15s, border-color .15s;
}
.footer-icon:hover { color: var(--accent); border-color: var(--accent-line); }

/* ── Mobile nav ───────────────────────────────────────────────────── */
.site-header__hamburger {
  display: none;
  width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid var(--bg-line); background: transparent;
  color: var(--fg-muted); cursor: pointer;
  place-items: center;
  transition: color .15s, border-color .15s;
  margin-left: auto;
}
.site-header__hamburger:hover { color: var(--fg); border-color: var(--fg); }

.site-header__mobile-overlay {
  display: none; position: fixed; inset: 0; z-index: 99;
  background: rgba(10,10,11,0.95); backdrop-filter: blur(16px);
  flex-direction: column; align-items: center; justify-content: center; gap: 24px;
}
html[data-theme="light"] .site-header__mobile-overlay {
  background: rgba(250,250,249,0.95);
}
.site-header__mobile-overlay.is-open { display: flex; }
.site-header__mobile-overlay a {
  font-family: var(--font-display); font-weight: 500;
  font-size: 22px; color: var(--fg-muted);
  padding: 12px 24px; border-radius: 12px;
  transition: color .15s, background .15s;
}
.site-header__mobile-overlay a:hover { color: var(--fg); background: var(--bg-line); }
.site-header__mobile-close {
  position: absolute; top: 16px; right: 20px;
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--bg-line); background: transparent;
  color: var(--fg-muted); cursor: pointer;
  display: grid; place-items: center;
  font-size: 20px;
}

@media (max-width: 768px) {
  .site-header__nav,
  .site-header .site-header__icon-btn,
  .site-header .btn--primary { display: none; }
  .site-header__hamburger { display: grid; }
}

/* ── Hero responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero__profile-card { width: 100%; max-width: 380px; }
}

@media (max-width: 480px) {
  .hero__profile-card { max-width: 340px; }
}

/* ── Mobile overflow fix ──────────────────────────────────────────── */
html, body { overflow-x: hidden; }

/* ── Hide keyboard shortcut on mobile ─────────────────────────────── */
@media (max-width: 768px) {
  .hero__search-inner > .mono { display: none; }
}

/* ── Reduced motion ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ── Typewriter cursor ────────────────────────────────────────────── */
@keyframes blink { 50% { opacity: 0; } }
.typewriter-cursor {
  display: inline-block; width: 2px; height: 1.1em;
  background: var(--accent); vertical-align: -2px;
  animation: blink 1s steps(2, end) infinite;
  margin-left: 2px;
}

/* ─── Markdown view ─────────────────────────────────────────────────
   Same content as the human view, formatted as a plain markdown
   document for AI agents, crawlers, and humans who prefer raw text. */

.md-doc {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px clamp(20px, 4vw, 48px) 96px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--fg);
}
.md-doc .muted { color: var(--fg-dim); }

.md-doc .md-statusbar {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  background: var(--accent-soft);
  border: 1px dashed var(--accent-line);
  border-radius: 8px;
  font-size: 12px; line-height: 1.55;
  margin-bottom: 28px;
}
.md-doc .md-statusbar .dot {
  width: 8px; height: 8px; flex: none; margin-top: 6px;
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: md-pulse 1.8s ease-in-out infinite;
}
@keyframes md-pulse { 0%,100% { opacity: 1 } 50% { opacity: .4 } }

.md-doc .md-url {
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--bg-line);
  border-radius: 8px 8px 0 0;
  font-size: 12px;
  border-bottom: 0;
  overflow-x: auto; white-space: nowrap;
}
.md-doc .md-yaml {
  margin: 0 0 32px; padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--bg-line);
  border-radius: 0 0 8px 8px;
  font-size: 12.5px; line-height: 1.6;
  overflow-x: auto;
  color: var(--fg-muted);
}
.md-doc .md-yaml code { font-family: inherit; color: var(--fg-muted); white-space: pre; }

.md-doc h1, .md-doc h2, .md-doc h3, .md-doc h4 {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--fg);
  margin: 28px 0 10px;
}
.md-doc h1 { font-size: 26px; line-height: 1.25; margin-top: 8px; }
.md-doc h2 {
  font-size: 20px; line-height: 1.3;
  padding-top: 24px; border-top: 1px solid var(--bg-line);
}
.md-doc h3 { font-size: 16px; line-height: 1.4; color: var(--fg); }
.md-doc h4 { font-size: 14px; line-height: 1.4; color: var(--fg-muted); }
.md-doc .hash { color: var(--accent); font-weight: 400; margin-right: 6px; }

.md-doc p { margin: 0 0 14px; color: var(--fg); }
.md-doc ul, .md-doc ol { margin: 0 0 18px; padding-left: 24px; color: var(--fg); }
.md-doc li { margin: 4px 0; }
.md-doc ul { list-style: none; padding-left: 16px; }
.md-doc ul > li::before { content: "-"; color: var(--accent); margin-right: 10px; }

.md-doc blockquote {
  margin: 0 0 18px; padding: 10px 16px;
  border-left: 3px solid var(--accent);
  color: var(--fg-muted);
  background: var(--bg-elev);
}
.md-doc a { color: var(--accent); border-bottom: 1px solid var(--accent-line); }
.md-doc code {
  font-family: var(--font-mono);
  background: var(--bg-card);
  border: 1px solid var(--bg-line);
  padding: 1px 6px; border-radius: 4px;
  font-size: 0.92em;
}
.md-doc strong { color: var(--fg); font-weight: 600; }
.md-doc em { color: var(--fg-muted); font-style: normal; }
.md-doc hr.md-hr { border: 0; border-top: 1px dashed var(--bg-line); margin: 32px 0; }
.md-doc .md-footer { margin-top: 56px; padding-top: 20px; border-top: 1px dashed var(--bg-line); font-size: 12px; }
