/* ============================================================
   lintuxt — personal AI hub
   Design system: dark-first, premium, AI-tech
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* dark theme (default) */
  --bg:           #08080c;
  --bg-elev:      #0e0e16;
  --surface:      #13131e;
  --surface-2:    #1a1a28;
  --border:       rgba(255, 255, 255, 0.08);
  --border-strong:rgba(255, 255, 255, 0.15);
  --text:         #ededf2;
  --text-dim:     #a2a2b6;
  --text-faint:   #6b6b80;
  --accent:       #8b9bff;
  --accent-bright:#a6b2ff;
  --accent-2:     #4fd8e8;
  --accent-soft:  rgba(139, 155, 255, 0.13);
  --accent-line:  rgba(139, 155, 255, 0.35);
  --on-accent:    #08080c;
  --shadow:       0 18px 50px -12px rgba(0, 0, 0, 0.7);
  --shadow-sm:    0 6px 20px -8px rgba(0, 0, 0, 0.6);
  --grid-line:    rgba(255, 255, 255, 0.028);

  /* type */
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* scale */
  --maxw: 1140px;
  --radius:   14px;
  --radius-lg:22px;
  --radius-sm:9px;

  color-scheme: dark;
}

[data-theme="light"] {
  /* Slate dim-mode palette — cool neutral grey, no warm tint.
     Contrast softened to a comfortable-reading range (text ~7.8:1
     rather than a sharp 9.1:1) while keeping the lifted-surface
     hierarchy intact. */
  --bg:           #c4c6cb;   /* cool neutral grey base */
  --bg-elev:      #dee0e5;   /* clearly lifted (~33% above bg) */
  --surface:      #dee0e5;
  --surface-2:    #aaadb3;   /* recessed */
  --border:       rgba(20, 22, 32, 0.22);
  --border-strong:rgba(20, 22, 32, 0.34);
  --text:         #2c2e34;   /* near-black,  ~7.8:1 AAA (softer) */
  --text-dim:     #4d4f56;   /* mid slate,   ~4.7:1 AA */
  --text-faint:   #62656e;   /* tertiary,    ~3.3:1 AA Large */
  --accent:       #4946c4;   /* muted periwinkle */
  --accent-bright:#3a37b0;
  --accent-2:     #0d7e8d;   /* deeper teal-cyan */
  --accent-soft:  rgba(73, 70, 196, 0.12);
  --accent-line:  rgba(73, 70, 196, 0.32);
  --on-accent:    #f0f1f5;   /* light text on dark periwinkle/teal gradient */
  --shadow:       0 18px 44px -14px rgba(20, 22, 32, 0.28);
  --shadow-sm:    0 8px 22px -10px rgba(20, 22, 32, 0.20);
  --grid-line:    rgba(20, 22, 32, 0.06);

  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--on-accent); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
section { position: relative; }
.section-pad { padding: clamp(64px, 11vw, 130px) 0; }

/* subtle background grid + glow */
.bg-fx {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 35%, transparent 100%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 35%, transparent 100%);
}
.bg-glow {
  position: fixed; z-index: -1; pointer-events: none;
  width: 70vw; height: 70vw; max-width: 760px; max-height: 760px;
  top: -28vw; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(139,155,255,0.20), transparent 62%);
  filter: blur(36px);
}
[data-theme="light"] .bg-glow { background: radial-gradient(circle, rgba(73,70,196,0.11), transparent 62%); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: 9px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent-line); }

.section-head { max-width: 620px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 16px 0 14px; }
.section-head p { color: var(--text-dim); font-size: 1.05rem; }

.gradient-text {
  background: linear-gradient(110deg, var(--accent-bright), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; letter-spacing: -0.02em; }
.brand .logo-mark {
  width: 44px; height: 44px; border-radius: 11px; display: block;
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  border: 1px solid var(--border-strong);
}
.brand .dim { color: var(--text-faint); font-weight: 400; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-size: 0.93rem; color: var(--text-dim); padding: 8px 14px; border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a:hover { color: var(--text); background: var(--accent-soft); }
.nav-links a.active { color: var(--text); }
.nav-links a .nav-pro-crown {
  width: 12px; height: 12px;
  vertical-align: -1px;
  margin-right: 5px;
  color: #f1c45a;
}
[data-theme="light"] .nav-links a .nav-pro-crown { color: #b9851a; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-dim); cursor: pointer;
  display: grid; place-items: center; transition: all 0.2s ease;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent-line); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .moon { display: none; }
[data-theme="light"] .theme-toggle .moon { display: block; }
[data-theme="light"] .theme-toggle .sun { display: none; }

.nav-toggle { display: none; width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 500;
  padding: 12px 22px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent); font-weight: 600;
  box-shadow: 0 10px 30px -10px var(--accent-line);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -10px var(--accent-line); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent-line); color: var(--accent); }
.btn-sponsor {
  background: rgba(219, 97, 162, 0.10);
  border-color: rgba(219, 97, 162, 0.45);
  color: #db61a2;
}
.btn-sponsor:hover {
  transform: translateY(-2px);
  background: rgba(219, 97, 162, 0.18);
  border-color: #db61a2;
  color: #ea4aaa;
}
.btn-sponsor svg { fill: currentColor; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 500; font-size: 0.95rem; }
.link-arrow svg { width: 15px; height: 15px; transition: transform 0.2s ease; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero { padding: clamp(70px, 12vw, 140px) 0 clamp(60px, 9vw, 110px); }
.hero-status {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 0.84rem; color: var(--text-dim);
  background: var(--surface); border: 1px solid var(--border);
  padding: 7px 15px; border-radius: 999px; margin-bottom: 30px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 0 var(--accent-2); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-2) 60%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.hero h1 { font-size: clamp(2.7rem, 7vw, 5rem); margin-bottom: 24px; }
.hero-lede { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--text-dim); max-width: 620px; margin-bottom: 36px; }
.hero-lede strong { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 30px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 70%);
  opacity: 0; transition: opacity 0.3s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.card:hover::after { opacity: 1; }

/* feature card (project) */
.feature-card { padding: 0; }
.feature-card .fc-body { padding: clamp(28px, 4vw, 44px); }
.fc-top { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.fc-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.fc-icon {
  width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  border: 1px solid var(--border-strong);
  display: grid; place-items: center; color: var(--accent);
}
.fc-icon svg { width: 26px; height: 26px; }
.fc-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.fc-sub { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-faint); }
.card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: 0.97rem; }

/* tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-dim);
  background: var(--surface); border: 1px solid var(--border-strong);
  padding: 5px 11px; border-radius: 7px;
}
.tag.accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

.meta-row { display: flex; flex-wrap: wrap; gap: 18px; font-size: 0.85rem; color: var(--text-faint); }
.meta-row span { display: inline-flex; align-items: center; gap: 6px; }
.meta-row svg { width: 14px; height: 14px; }

/* project list card */
.proj-card { display: flex; flex-direction: column; gap: 16px; }
.proj-card .pc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.proj-card .pc-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.status-pill {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase; vertical-align: middle;
  padding: 4px 9px; border-radius: 6px; white-space: nowrap;
  border: 1px solid transparent;
}
.status-pill.live {
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 13%, transparent);
  border-color: color-mix(in srgb, var(--accent-2) 40%, transparent);
}
.status-pill.coming-soon {
  color: var(--text-dim);
  background: var(--surface-2);
  border-color: var(--border);
}

/* project tier badge (pricing). Shape mirrors .registry so all card
   pills (platform, tier, registry) share one visual treatment;
   per-type color overrides live below. */
.tier {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}
.tier.free { color: var(--accent-bright); background: var(--accent-soft); border-color: var(--accent-line); }
.tier.pro {
  color: #f1c45a;
  background: color-mix(in srgb, #f1c45a 15%, transparent);
  border-color: color-mix(in srgb, #f1c45a 40%, transparent);
}
[data-theme="light"] .tier.pro {
  color: #8a5e00;
  background: color-mix(in srgb, #b9851a 14%, transparent);
  border-color: color-mix(in srgb, #8a5e00 34%, transparent);
}
.tier.pro svg {
  width: 11px; height: 11px;
  vertical-align: -1px;
  margin-right: 1px;
}
[data-theme="light"] .registry-pypi {
  background: color-mix(in srgb, #b9851a 14%, transparent);
  color: #8a5e00;
  border-color: color-mix(in srgb, #8a5e00 34%, transparent);
}
[data-theme="light"] .registry-qmk {
  background: color-mix(in srgb, #b54a1f 14%, transparent);
  color: #b54a1f;
  border-color: color-mix(in srgb, #b54a1f 34%, transparent);
}
[data-theme="light"] .registry-swiftpm {
  background: color-mix(in srgb, #b53d2a 14%, transparent);
  color: #b53d2a;
  border-color: color-mix(in srgb, #b53d2a 34%, transparent);
}

/* registry badge (package registry label) */
.registry {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.registry-pypi {
  background: rgba(255, 212, 59, 0.10);
  color: #ffd43b;
  border-color: rgba(255, 212, 59, 0.25);
}

/* QMK uses the lintuxt orange (sourced from displayswitcher.com,
   #ff7a45 — warm coral). SwiftPM uses Swift's brand red-orange
   (#f05138). PyPI keeps Python's brand yellow. */
.registry-qmk {
  background: rgba(255, 122, 69, 0.10);
  color: #ff7a45;
  border-color: rgba(255, 122, 69, 0.25);
}
.registry-swiftpm {
  background: rgba(240, 81, 56, 0.10);
  color: #f05138;
  border-color: rgba(240, 81, 56, 0.30);
}

/* project card meta footer */
.pc-meta {
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--text-faint);
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.pc-meta .sep { opacity: 0.5; }

/* platform badge (neutral). Shape mirrors .registry so all card
   pills share one visual treatment. */
.platform {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* featured card (Pro product launchpad — /featured/) */
.feat-card { display: flex; flex-direction: column; gap: 16px; }
.feat-card .pc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.feat-card .pc-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.feat-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  margin-top: auto; /* pin to card bottom regardless of body height */
  padding-top: 4px;
}
.feat-actions .btn { padding: 10px 18px; font-size: 0.9rem; }
.feat-actions .ext-glyph { font-size: 0.9em; opacity: 0.85; margin-left: 2px; }

/* ---------- Post list ---------- */
.post-list { display: flex; flex-direction: column; }
.post-row {
  display: flex; align-items: baseline; gap: 24px; padding: 26px 0;
  border-bottom: 1px solid var(--border); transition: padding-left 0.2s ease;
}
.post-row:hover { padding-left: 10px; }
.post-row:last-child { border-bottom: none; }
.post-date { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-faint); white-space: nowrap; min-width: 116px; }
.post-row h3 { font-size: 1.28rem; margin-bottom: 8px; }
.post-row:hover h3 { color: var(--accent); }
.post-row p { color: var(--text-dim); font-size: 0.96rem; }

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: clamp(40px, 7vw, 72px);
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; top: -50%; left: 50%; transform: translateX(-50%);
  width: 480px; height: 480px; pointer-events: none;
  background: radial-gradient(circle, var(--accent-soft), transparent 65%);
}
.cta-band h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin-bottom: 14px; position: relative; }
.cta-band p { color: var(--text-dim); max-width: 480px; margin: 0 auto 28px; position: relative; }
.cta-band .hero-cta { justify-content: center; position: relative; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 54px 0 40px; margin-top: 40px; }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.footer-tag { color: var(--text-dim); font-size: 0.92rem; max-width: 280px; margin-top: 12px; }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); display: grid; place-items: center; color: var(--text-dim);
  transition: all 0.2s ease;
}
.footer-socials a:hover { color: var(--accent); border-color: var(--accent-line); transform: translateY(-2px); }
.footer-socials svg { width: 18px; height: 18px; }
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 0.85rem; color: var(--text-faint);
}
.footer-bottom a:hover { color: var(--accent); }
.footer-updated { opacity: .7; }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding: clamp(56px, 9vw, 96px) 0 clamp(34px, 5vw, 56px); }
.breadcrumb { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-faint); margin-bottom: 22px; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 8px; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: 18px; }
.page-head .lede { font-size: 1.12rem; color: var(--text-dim); max-width: 640px; }
.page-head .hero-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }

/* ---------- Resume ---------- */
.resume { max-width: 820px; margin: 0 auto; }
.resume-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: clamp(30px, 5vw, 58px);
  box-shadow: var(--shadow-sm);
}
.resume-headline { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.resume-headline img { width: 120px; height: 120px; border-radius: 50%; border: 1px solid var(--border-strong); object-fit: cover; }
.resume-headline h2 { font-size: 1.9rem; }
.resume-headline .role { color: var(--accent); font-family: var(--font-mono); font-size: 0.86rem; margin-top: 4px; }
.resume-headline .loc { color: var(--text-faint); font-size: 0.9rem; margin-top: 4px; }

.resume-section { margin-top: 36px; }
.resume-section:first-of-type { margin-top: 0; }
.resume-section > h3 {
  font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.resume-section p { color: var(--text-dim); }
.resume-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.resume-list li { display: flex; gap: 11px; color: var(--text-dim); }
.resume-list li::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; margin-top: 9px; border-radius: 2px; background: var(--accent); }

.timeline { display: flex; flex-direction: column; }
.timeline-item { position: relative; padding: 0 0 26px 26px; border-left: 1px solid var(--border); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -5px; top: 4px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg);
}
.timeline-item h4 { font-size: 1.08rem; }
.timeline-item .org { color: var(--text); font-weight: 500; font-size: 0.96rem; }
.timeline-item .when { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-faint); margin-top: 3px; }
.timeline-item.muted::before { background: var(--text-faint); }

.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.contact-grid a, .contact-grid span {
  display: flex; align-items: center; gap: 10px; font-size: 0.93rem; color: var(--text-dim);
  background: var(--surface); border: 1px solid var(--border-strong); padding: 11px 14px; border-radius: 10px;
}
.contact-grid a:hover { color: var(--accent); border-color: var(--accent-line); }
.contact-grid svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }

.skill-group { margin-bottom: 16px; }
.skill-group:last-child { margin-bottom: 0; }
.skill-group .label { font-size: 0.88rem; color: var(--text-faint); margin-bottom: 8px; }

/* ---------- Article / prose ---------- */
.article { max-width: 720px; margin: 0 auto; }
.article-meta { display: flex; align-items: center; gap: 14px; font-size: 0.88rem; color: var(--text-faint); margin-bottom: 36px; }
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }
.author-chip { display: flex; align-items: center; gap: 9px; }
.author-chip img { width: 28px; height: 28px; border-radius: 50%; }

.prose { font-size: 1.07rem; line-height: 1.78; color: var(--text-dim); }
.prose > * + * { margin-top: 1.35em; }
.prose h2 { font-size: 1.6rem; color: var(--text); margin-top: 2em; }
.prose h3 { font-size: 1.25rem; color: var(--text); margin-top: 1.7em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent); border-bottom: 1px solid var(--accent-line); }
.prose a:hover { border-bottom-color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-top: 0.5em; }
.prose li::marker { color: var(--accent); }
.prose blockquote {
  border-left: 3px solid var(--accent); padding: 4px 0 4px 22px;
  color: var(--text); font-style: italic;
}
.prose code {
  font-family: var(--font-mono); font-size: 0.88em; background: var(--surface-2);
  border: 1px solid var(--border); padding: 2px 6px; border-radius: 6px; color: var(--accent-bright);
}
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2.4em 0; }
.callout {
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 20px 24px; color: var(--text-dim);
}

.article-foot { margin-top: 56px; padding-top: 30px; border-top: 1px solid var(--border); }

/* ---------- Product page sections ---------- */
.proj-section { margin-top: 64px; }
.proj-section .section-title {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 600;
  letter-spacing: -0.02em; margin-bottom: 22px;
}

/* hero screenshot frame */
.hero-shot {
  margin: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 28px 60px -24px rgba(0,0,0,0.5);
}
.hero-shot img { display: block; width: 100%; height: auto; }

/* feature block card */
.feature-block { padding: 24px 26px; display: flex; flex-direction: column; gap: 10px; }
.feature-block .fb-name {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent);
}
.feature-block h3 { font-size: 1.1rem; margin: 0; }
.feature-block p { color: var(--text-dim); font-size: 0.95rem; line-height: 1.6; }

/* code block with copy button */
.code-block {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.code-block pre {
  margin: 0; padding: 20px 24px;
  font-family: var(--font-mono); font-size: 0.88rem; line-height: 1.7;
  color: var(--text); background: transparent;
  overflow-x: auto;
}
.code-block pre code {
  font: inherit; color: inherit;
  background: transparent; border: none; padding: 0;
  white-space: pre;
}
.copy-btn {
  position: absolute; top: 10px; right: 10px;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-dim);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 5px 10px; border-radius: 6px; cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.copy-btn:hover { color: var(--text); border-color: var(--border-strong); }
.copy-btn.copied {
  color: var(--accent-2);
  border-color: color-mix(in srgb, var(--accent-2) 40%, transparent);
}

/* collapsible details */
.proj-details {
  margin-top: 56px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.proj-details > summary {
  list-style: none; cursor: pointer; user-select: none;
  padding: 18px 22px;
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim);
  display: flex; align-items: center; gap: 12px;
}
.proj-details > summary::-webkit-details-marker { display: none; }
.proj-details > summary::before {
  content: "+"; font-size: 1.05rem; line-height: 1; color: var(--accent);
  width: 12px; display: inline-block; text-align: center;
}
.proj-details[open] > summary::before { content: "−"; }
.proj-details > summary:hover { color: var(--text); }
.proj-details .details-body {
  padding: 4px 22px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.97rem; line-height: 1.7;
}
.proj-details .details-body h3 {
  font-size: 1rem; color: var(--text); margin-top: 22px; margin-bottom: 8px;
}
.proj-details .details-body h3:first-child { margin-top: 14px; }
.proj-details .details-body p { margin: 0 0 8px; }
.proj-details .details-body a { color: var(--accent); border-bottom: 1px solid var(--accent-line); }
.proj-details .details-body a:hover { border-bottom-color: var(--accent); }
.proj-details .details-body .code-block { margin-top: 10px; }

/* sponsor callout — pink-tinted card that sits between content sections and the
   collapsible details, so the GitHub Sponsors CTA reads as a distinct visual unit
   instead of disappearing into license/legal copy. */
.proj-sponsor {
  padding: 18px 24px 20px;
  background: rgba(219, 97, 162, 0.07);
  border: 1px solid rgba(219, 97, 162, 0.20);
  border-left: 3px solid #db61a2;
  border-radius: var(--radius-sm);
}
.proj-sponsor .section-title {
  color: #db61a2;
  font-size: 1.4rem;
  margin-top: 0;
  margin-bottom: 10px;
}
.proj-sponsor p { color: var(--text-dim); margin: 0; }
.proj-sponsor a {
  color: #db61a2;
  border-bottom: 1px solid rgba(219, 97, 162, 0.35);
}
.proj-sponsor a:hover {
  color: #ea4aaa;
  border-bottom-color: #ea4aaa;
}

/* ---------- Terminal screenshot component ----------
   Replaces static PNG screenshots with a styled HTML mock-up.
   Compiler-friendly: every visible element has a semantic class,
   so a renderer can emit lines from structured data.

   Markup:
     <figure class="terminal">
       <div class="terminal-bar">
         <span class="tl-dot tl-red"></span>
         <span class="tl-dot tl-yellow"></span>
         <span class="tl-dot tl-green"></span>
         <span class="terminal-title">…</span>
       </div>
       <pre class="terminal-body">…lines with inline spans…</pre>
     </figure>
*/
.terminal {
  /* Brand-aligned terminal palette — semantic classes mirroring CLIKit Tone.
     Canonical table: swift-cli-kit/CONVENTIONS.md. Pinned to the DARK brand
     tokens (panel stays dark even in light mode). */
  --t-bg:     #14141d;
  --t-bar:    #1f1f2c;
  --t-strong: #ededf2;   /* title/heading/value · = --text */
  --t-accent: #4fd8e8;   /* accent · = --accent-2 teal */
  --t-link:   #4fd8e8;   /* link · teal (underlined) */
  --t-muted:  #a2a2b6;   /* muted · = --text-dim */
  --t-subtle: #6b6b80;   /* subtle · = --text-faint */
  --t-ok:     #7ee0a5;   /* ok · brand mint */
  --t-warn:   #f0c674;   /* warn · brand gold */
  --t-error:  #f08a8a;   /* error · brand-tinted coral */
  --t-love:   #ee8fc8;   /* love · brand pink */

  margin: 0;
  border-radius: 10px;
  background: var(--t-bg);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  box-shadow: 0 28px 60px -24px rgba(0,0,0,0.55);
}
.terminal-bar {
  position: relative;
  display: flex; align-items: center;
  padding: 10px 14px;
  background: var(--t-bar);
  border-bottom: 1px solid rgba(0,0,0,0.25);
}
.tl-dot { width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; flex-shrink: 0; }
.tl-dot:last-of-type { margin-right: 0; }
.tl-red    { background: #ff5f56; }
.tl-yellow { background: #ffbd2e; }
.tl-green  { background: #27c93f; }
.terminal-title {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 12px; color: var(--t-muted);
  pointer-events: none; white-space: nowrap;
}
.terminal-body {
  margin: 0;
  padding: 16px 20px 18px;
  font-family: 'JetBrains Mono', 'Menlo', 'SF Mono', ui-monospace, monospace;
  font-size: 13.5px; line-height: 1.55;
  color: var(--t-strong);
  white-space: pre;
  overflow-x: auto;
}

/* terminal color spans — semantic, see swift-cli-kit/CONVENTIONS.md */
.t-muted  { color: var(--t-muted); }
.t-subtle { color: var(--t-subtle); }
.t-accent { color: var(--t-accent); }
.t-ok     { color: var(--t-ok); }
.t-warn   { color: var(--t-warn); }
.t-error  { color: var(--t-error); }
.t-love   { color: var(--t-love); }
.t-strong { color: var(--t-strong); font-weight: 600; }
.t-link   { color: var(--t-link); text-decoration: underline; text-underline-offset: 2px; }

/* blinking block cursor (used at end of prompt) */
.t-cursor {
  display: inline-block; width: 0.6em; height: 1.1em;
  background: var(--t-strong); vertical-align: text-bottom;
  animation: t-blink 1.1s steps(2, end) infinite;
}
@keyframes t-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .t-cursor { animation: none; } }

/* Light-theme terminal — same semantic classes, light brand values.
   Neutrals + accent from the light tokens; status colors darkened for contrast. */
[data-theme="light"] .terminal {
  --t-bg:     #d7d9de;
  --t-bar:    #c9ccd2;
  --t-strong: #2c2e34;   /* = light --text */
  --t-accent: #0d7e8d;   /* = light --accent-2 teal */
  --t-link:   #0d7e8d;   /* teal, underlined */
  --t-muted:  #4d4f56;   /* = light --text-dim */
  --t-subtle: #62656e;   /* = light --text-faint */
  --t-ok:     #1f9d57;   /* darker mint */
  --t-warn:   #9a6b00;   /* darker gold */
  --t-error:  #c0392b;   /* darker coral */
  --t-love:   #b03e8d;   /* darker pink */
  border-color: rgba(20, 22, 32, 0.12);
}

/* ---------- 404 ---------- */
.nf { min-height: 66vh; display: grid; place-items: center; text-align: center; }
.nf .code { font-family: var(--font-display); font-size: clamp(5rem, 16vw, 10rem); line-height: 1; }
.nf p { color: var(--text-dim); margin: 14px 0 28px; }

/* ---------- Reveal animation (progressive enhancement: only when JS is on) ---------- */
html.js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 0.7s cubic-bezier(.2,.6,.2,1), transform 0.7s cubic-bezier(.2,.6,.2,1); }
html.js [data-reveal].in-view { opacity: 1; transform: none; }
html.js [data-reveal][data-delay="1"] { transition-delay: 0.08s; }
html.js [data-reveal][data-delay="2"] { transition-delay: 0.16s; }
html.js [data-reveal][data-delay="3"] { transition-delay: 0.24s; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .nav-links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--bg-elev); border-bottom: 1px solid var(--border); padding: 14px 20px;
    gap: 2px; transform: translateY(-130%); transition: transform 0.3s ease; z-index: 40;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 13px 14px; }
  .nav-toggle { display: grid; place-items: center; }
  .post-row { flex-direction: column; gap: 6px; }
  .post-date { min-width: 0; }
  .resume-headline { gap: 16px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

