/* ============================================================
   LCG personal site — design system
   Dark mode first. Electric cyan accent. Bold + techy.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }

:root {
  /* ── Color tokens ───────────────────────────────────────── */
  --bg: #0A0A0F;                      /* near-black with a hint of blue */
  --bg-elevated: #11111A;
  --bg-subtle: #16161F;
  --surface: #1A1A24;
  --surface-hover: #20202C;
  --border: #24242F;
  --border-strong: #2E2E3D;

  --text: #F5F5F7;                    /* near-white, off pure for less glare */
  --text-soft: #B8B8C5;
  --text-muted: #7E7E8E;
  --text-subtle: #565664;

  --accent: #00E5FF;                  /* electric cyan */
  --accent-soft: rgba(0, 229, 255, 0.12);
  --accent-strong: #4DECFF;
  --accent-deep: #00B8CC;

  --danger: #FF5470;
  --success: #4ADE80;

  /* ── Type scale ─────────────────────────────────────────── */
  --font-display: "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-md: 16px;
  --fs-lg: 18px;
  --fs-xl: 22px;
  --fs-2xl: 28px;
  --fs-3xl: 36px;
  --fs-4xl: 48px;
  --fs-5xl: 64px;
  --fs-6xl: 88px;

  --tracking-tight: -0.03em;
  --tracking-snug: -0.015em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-widest: 0.12em;

  /* ── Spacing tokens (4px scale) ─────────────────────────── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* ── Radii ──────────────────────────────────────────────── */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* ── Motion ─────────────────────────────────────────────── */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.7, 0, 0.3, 1);

  /* ── Shadows / glows ────────────────────────────────────── */
  --shadow-glow: 0 0 0 1px rgba(0, 229, 255, 0.2), 0 8px 32px rgba(0, 229, 255, 0.12);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ── Reset for nav lists/links ───────────────────────────── */
.site-header a, .site-footer a, .site-header ul, .site-footer ul,
.site-header *, .site-footer * { text-decoration: none; color: inherit; }
.site-header ul, .site-footer ul, #main ul.list-bare { list-style: none; margin: 0; padding: 0; }

/* ── Layout container ────────────────────────────────────── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; width: 100%; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* ── Typography primitives ──────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  letter-spacing: var(--tracking-tight);
  line-height: 1.1;
  color: var(--text);
}
h1 { font-size: clamp(40px, 6vw, var(--fs-6xl)); letter-spacing: var(--tracking-tight); line-height: 1.04; }
h2 { font-size: clamp(28px, 4vw, var(--fs-4xl)); line-height: 1.1; }
h3 { font-size: var(--fs-2xl); line-height: 1.2; }
h4 { font-size: var(--fs-xl); }
p  { margin: 0; color: var(--text-soft); }

a { color: var(--accent-strong); text-decoration: none; }
a:hover { color: var(--accent); }

::selection { background: var(--accent); color: var(--bg); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--accent);
  margin: 0 0 16px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

.lead {
  font-size: var(--fs-lg);
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0;
}

/* ── Header / nav ───────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: var(--tracking-snug);
  color: var(--text);
}
.brand .accent-glyph { color: var(--accent); }
.brand:hover { color: var(--text); }

.nav-primary {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-primary a {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-soft);
  transition: color 200ms var(--ease-out);
  position: relative;
}
.nav-primary a:hover { color: var(--text); }
.nav-primary a.active { color: var(--text); }
.nav-primary a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.nav-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}
.lang-toggle {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color 200ms var(--ease-out), background 200ms var(--ease-out);
}
.lang-toggle:hover { color: var(--accent); background: var(--accent-soft); }

.mobile-toggle { display: none; cursor: pointer; background: none; border: 0; color: var(--text); padding: 8px; }
.mobile-toggle svg { width: 22px; height: 22px; }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  padding: 16px 24px 24px;
}
.mobile-menu.active { display: block; }
.mobile-menu a {
  display: block;
  padding: 14px 0;
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text-soft);
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: 0; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 200ms var(--ease-out), color 200ms var(--ease-out), border-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--bg); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--text-muted); }
.btn-link {
  background: transparent;
  color: var(--accent);
  padding: 0;
  border: 0;
}
.btn-link:hover { color: var(--accent-strong); gap: 12px; }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: clamp(80px, 14vh, 160px) 0 clamp(72px, 12vh, 128px);
  overflow: hidden;
}
.hero::before {
  /* Subtle grid + radial accent — no AI-blob nonsense */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 70% 50% at 80% 0%, rgba(0, 229, 255, 0.10), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: auto, 64px 64px, 64px 64px;
  background-position: 0 0, 0 0, 0 0;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, black 40%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; max-width: 920px; }
.hero h1 {
  margin-bottom: 24px;
}
.hero h1 .accent { color: var(--accent); }
.hero .hero-sub {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  color: var(--text-soft);
  max-width: 680px;
  margin: 0 0 40px;
}
.hero .hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-meta {
  margin-top: 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.hero-meta-item { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta-item .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ── Section primitives ─────────────────────────────────── */
.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.section.alt-bg { background: var(--bg-elevated); }
.section-head {
  margin-bottom: clamp(40px, 6vw, 72px);
  max-width: 720px;
}
.section-head h2 { margin-bottom: 16px; }
.section-head .lead { color: var(--text-soft); }

/* ── Card grid (Companies, Speaking, etc.) ──────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: border-color 200ms var(--ease-out), transform 200ms var(--ease-out), background 200ms var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); background: var(--surface-hover); }
.card .card-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--accent);
}
.card h3 { font-size: var(--fs-2xl); margin: 0; letter-spacing: var(--tracking-snug); }
.card .card-role {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
}
.card p { font-size: var(--fs-md); line-height: 1.6; color: var(--text-soft); flex: 1; }
.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
  transition: gap 200ms var(--ease-out);
}
.card:hover .card-link { gap: 14px; }
.card .card-link svg { width: 14px; height: 14px; }

/* ── Featured 2-column section (e.g. Genius AI block) ───── */
.feature-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}
.feature-split .video-placeholder {
  aspect-ratio: 16 / 9;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  position: relative;
  overflow: hidden;
}
.feature-split .video-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,229,255,0.10), transparent 70%);
}
.feature-split .video-placeholder span { position: relative; z-index: 1; padding: 6px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); }

/* ── Article / blog list ────────────────────────────────── */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}
.post-row {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 32px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: padding 200ms var(--ease-out);
}
.post-row:hover { padding-left: 8px; }
.post-row:hover .post-title { color: var(--accent); }
.post-date {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--text-muted);
  white-space: nowrap;
}
.post-title {
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--text);
  letter-spacing: var(--tracking-snug);
  line-height: 1.35;
  transition: color 200ms var(--ease-out);
}
.post-tag {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--accent);
  white-space: nowrap;
}

/* ── Article page (single post) ─────────────────────────── */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) 24px;
}
.article-meta {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--text-muted);
  margin-bottom: 32px;
}
.article-meta .accent { color: var(--accent); }
.article h1 { font-size: clamp(32px, 4.5vw, 56px); margin-bottom: 24px; line-height: 1.1; }
.article-excerpt { font-size: var(--fs-xl); color: var(--text-soft); margin-bottom: 56px; line-height: 1.5; }
.article-body h2 { font-size: var(--fs-2xl); margin: 48px 0 16px; letter-spacing: var(--tracking-snug); }
.article-body h3 { font-size: var(--fs-xl); margin: 36px 0 12px; }
.article-body p, .article-body li { font-size: var(--fs-lg); line-height: 1.7; color: var(--text-soft); margin: 0 0 24px; }
.article-body ul, .article-body ol { padding-left: 24px; margin: 0 0 24px; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.article-body a:hover { color: var(--accent-strong); }
.article-body blockquote { border-left: 2px solid var(--accent); margin: 32px 0; padding: 8px 24px; color: var(--text); font-style: italic; }
.article-body code { background: var(--bg-elevated); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.9em; color: var(--accent-strong); }
.article-body pre { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; overflow-x: auto; margin: 24px 0; }
.article-body pre code { background: transparent; padding: 0; color: var(--text-soft); }

/* ── Empty state (Speaking page) ────────────────────────── */
.empty-state {
  text-align: center;
  padding: 96px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
}
.empty-state .empty-title {
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px;
}
.empty-state p { color: var(--text-muted); max-width: 400px; margin: 0 auto; }

/* ── Contact page ───────────────────────────────────────── */
.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color 200ms var(--ease-out), background 200ms var(--ease-out);
}
.contact-row:hover { border-color: var(--accent); background: var(--surface-hover); }
.contact-row .contact-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-row svg { width: 20px; height: 20px; }
.contact-row .contact-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--text-muted);
  display: block;
}
.contact-row .contact-value {
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text);
  display: block;
  margin-top: 4px;
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 56px 0 32px;
  margin-top: clamp(72px, 10vw, 128px);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: var(--fs-sm);
  color: var(--text-soft);
}
.footer-nav a:hover { color: var(--accent); }
.footer-social {
  display: flex;
  gap: 12px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-soft);
  transition: border-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.footer-social a:hover { border-color: var(--accent); color: var(--accent); }
.footer-social svg { width: 18px; height: 18px; }
.footer-meta {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.footer-meta .built-in { color: var(--text-muted); }
.footer-meta .built-in .accent { color: var(--accent); }

/* ── Reveal-on-scroll utility ───────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ── Focus ring (visible, accessible) ───────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav-primary { display: none; }
  .mobile-toggle { display: inline-flex; }
  .feature-split { grid-template-columns: 1fr; gap: 40px; }
  .post-row { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
  .post-row .post-tag { justify-self: start; }
}
@media (max-width: 640px) {
  .hero { padding: 64px 0 80px; }
  .hero .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero .hero-ctas .btn { justify-content: center; }
  .hero-meta { gap: 16px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-meta { flex-direction: column; gap: 16px; align-items: flex-start; }
}
