/* HH Ventures — design system
   Dark, editorial, type-led. One warm accent. No external assets, no JS for layout. */

:root {
  /* Surfaces — a deliberate elevation ladder, faint warmth in the darks */
  --bg:         #0a0a0b;
  --bg-1:       #101013;
  --bg-card:    #151517;
  --bg-card-2:  #1c1c20;

  /* Hairlines */
  --line:       #2b2b32;
  --line-soft:  #1d1d22;

  /* Ink */
  --text:       #f3f3f5;
  --text-mut:   #a5a5af;
  --text-dim:   #6d6d77;

  /* Accent — warm sand */
  --accent:     #d8a878;
  --accent-2:   #ecc298;
  --accent-ink: #1a140c;
  --glow:       rgba(216, 168, 120, 0.13);

  --danger:     #e07a5f;

  --max:        1080px;
  --pad:        clamp(20px, 4vw, 44px);
  --radius:     16px;
  --radius-sm:  10px;

  --font-sans:  "Inter var", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:  ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(58% 320px at 50% 0, var(--glow), transparent);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Bilingual show/hide — toggled via [data-lang] on <html> */
html[data-lang="en"] [lang="fr"] { display: none; }
html[data-lang="fr"] [lang="en"] { display: none; }

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
a:hover { color: var(--accent-2); border-color: var(--accent); }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; }
h1 { font-size: clamp(40px, 6vw, 62px); line-height: 1.04; letter-spacing: -0.035em; }
h2 { font-size: clamp(27px, 3.8vw, 38px); line-height: 1.12; }
h3 { font-size: 18px; line-height: 1.35; letter-spacing: -0.015em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.muted { color: var(--text-mut); font-weight: 400; }

.kicker {
  display: flex; align-items: center; gap: 11px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 18px;
}
.kicker::before {
  content: ""; width: 24px; height: 1px;
  background: var(--accent); opacity: .65; flex: none;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 0 0 22px;
}

main, section, header, footer { display: block; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px 16px;
  padding: 13px var(--pad);
  background: rgba(10, 10, 11, 0.8);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  border: 0; color: var(--text); font-weight: 600; letter-spacing: -0.01em;
}
.brand-mark {
  display: block; flex: none;
  width: 30px; height: 30px;
}
.brand-name { font-size: 15px; color: var(--text-mut); }
.brand:hover .brand-name { color: var(--text); }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-size: 14px; color: var(--text-mut); border: 0;
  padding: 7px 11px; border-radius: 8px;
  transition: color .16s var(--ease), background .16s var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--bg-card); }
.nav-links a[aria-current="true"] { color: var(--text); }
.nav-links a.nav-cta {
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--line);
}
.nav-links a.nav-cta:hover { border-color: var(--accent); color: var(--accent-2); }

.lang-toggle {
  display: inline-flex;
  margin-left: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.lang-toggle button {
  appearance: none; -webkit-appearance: none;
  background: transparent; border: 0;
  color: var(--text-dim);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  padding: 6px 11px; cursor: pointer;
  transition: color .16s var(--ease), background .16s var(--ease);
}
.lang-toggle button:hover { color: var(--text); }
.lang-toggle button.active { background: var(--accent); color: var(--accent-ink); font-weight: 700; }

@media (max-width: 560px) {
  .nav-links { gap: 4px; }
  .nav-links a:not(.nav-cta) { display: none; }
}
@media (max-width: 480px) {
  .brand-name { display: none; }
}

/* Layout shell */
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
section { padding: 104px 0; border-bottom: 1px solid var(--line-soft); }
section:last-of-type { border-bottom: 0; }
@media (max-width: 700px) { section { padding: 76px 0; } }

.section-head { margin-bottom: 46px; max-width: 720px; }
.section-sub { color: var(--text-mut); margin-top: 14px; max-width: 58ch; }

/* Let grid items shrink below their intrinsic content width */
.proof-grid > *, .background-grid > *, .about-grid > * { min-width: 0; }

/* Shared card surface */
.proof-card, .about-card, .contact-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* Hero */
.hero { padding-top: 76px; padding-bottom: 112px; }
.hero h1 { max-width: 15ch; }
.hero h1 .muted { font-size: 0.72em; line-height: 1.18; letter-spacing: -0.02em; }
.hero .lede {
  color: var(--text-mut); margin-top: 28px; max-width: 56ch;
  font-size: 19px; line-height: 1.62;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 36px 0 24px; }
.hero .meta { color: var(--text-dim); font-size: 13.5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 22px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; font-weight: 600;
  background: transparent; color: var(--text);
  cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease), transform .12s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  border-color: var(--accent);
  box-shadow: 0 10px 28px -12px var(--accent);
}
.btn-primary:hover {
  background: var(--accent-2); border-color: var(--accent-2);
  box-shadow: 0 14px 34px -12px var(--accent);
}
.btn-ghost { color: var(--text-mut); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }

/* Projects */
.proof-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px) { .proof-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .proof-grid { grid-template-columns: 1fr; } }

.proof-card {
  padding: 24px;
  transition: border-color .22s var(--ease), background .22s var(--ease), transform .22s var(--ease), box-shadow .22s var(--ease);
}
.proof-card:hover {
  transform: translateY(-3px);
  background: var(--bg-card-2);
  border-color: var(--accent);
  box-shadow: 0 18px 44px -22px rgba(0, 0, 0, 0.9);
}
.proof-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 16px;
}
.proof-card h3 { margin: 0 0 10px; font-size: 17px; }
.proof-card p { color: var(--text-mut); font-size: 15px; line-height: 1.6; margin: 0; }

/* Background — experience, education, skills */
.background-label {
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-dim); font-weight: 600; margin: 0 0 4px;
}
.xp-list { list-style: none; padding: 0; margin: 0; }
.xp-entry { padding: 28px 0; border-top: 1px solid var(--line-soft); }
.xp-entry:first-child { border-top: 0; padding-top: 6px; }
.xp-period {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--accent-2); letter-spacing: 0.04em;
  margin: 0 0 9px;
}
.xp-role { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; color: var(--text); margin: 0 0 3px; }
.xp-org { color: var(--text-mut); font-size: 14px; margin: 0 0 12px; }
.xp-desc { color: var(--text-mut); font-size: 15px; line-height: 1.62; max-width: 66ch; margin: 0 0 14px; }
.xp-desc:last-child { margin-bottom: 0; }
.xp-entry .tags { margin-top: 0; }
.background-grid {
  display: grid; gap: 48px;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  margin-top: 64px;
}
@media (max-width: 880px) { .background-grid { grid-template-columns: 1fr; gap: 44px; } }

/* Build log */
.log-list { list-style: none; padding: 0; margin: 0; }
.log-entry { padding: 32px 0; border-top: 1px solid var(--line-soft); }
.log-entry:first-child { border-top: 0; padding-top: 6px; }
.log-entry time {
  display: inline-block;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--accent-2); letter-spacing: 0.04em;
  margin-bottom: 9px;
}
.log-entry h3 { margin-bottom: 8px; }
.log-entry p { color: var(--text-mut); max-width: 70ch; }
.log-entry h3 a { border: 0; color: var(--text); }
.log-entry h3 a:hover { color: var(--accent-2); }
.log-cadence { margin-top: 36px; color: var(--text-dim); font-size: 14px; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.tags span {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.03em;
  padding: 4px 10px; border-radius: 999px;
  background: var(--bg-1); border: 1px solid var(--line-soft);
  color: var(--text-dim);
}

/* About */
.about-grid {
  display: grid; gap: 48px;
  grid-template-columns: 1.35fr 1fr;
  align-items: start;
}
@media (max-width: 880px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }
.about-copy h2 { margin-bottom: 20px; }
.about-copy p { color: var(--text-mut); max-width: 58ch; }
.about-links { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 14px; }
.about-links a { color: var(--text-mut); border-bottom-color: var(--line-soft); }
.about-links span { color: var(--text-dim); }
.about-card { padding: 12px 26px; }
.about-card-row {
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  margin: 0;
}
.about-card-row:last-child { border-bottom: 0; }
.about-card-row span:last-child { min-width: 0; }
.about-card-row span:first-child { color: var(--text-dim); }
.about-card-row span:last-child { color: var(--text); text-align: right; font-weight: 500; }

/* Contact */
.contact-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px;
  flex-wrap: wrap;
}
.contact-mail {
  font-family: var(--font-mono); font-size: 18px;
  color: var(--text); border: 0; word-break: break-all;
}
.contact-mail:hover { color: var(--accent-2); }
.copy-mail {
  height: 38px; padding: 0 16px;
  background: var(--bg-card-2); color: var(--text-mut);
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.copy-mail:hover { color: var(--text); border-color: var(--accent); }
.copy-mail.copied { color: var(--accent-2); border-color: var(--accent); }
.contact-meta { margin-top: 22px; color: var(--text-dim); font-size: 14px; }

/* Footer */
.footer {
  max-width: var(--max); margin: 0 auto;
  padding: 40px var(--pad) 64px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-dim); font-size: 13px;
}
.footer a { color: var(--text-mut); border: 0; }
.footer a:hover { color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 0; }

/* 404 */
.notfound { min-height: 76vh; display: grid; place-items: center; text-align: center; padding: 40px var(--pad); }
.notfound-title { max-width: 16ch; margin: 0 auto 18px; }
.notfound-copy { max-width: 48ch; margin: 0 auto 30px; }

/* Log archive page */
.log-archive { padding-top: 72px; }

/* Post page */
.post-main { max-width: 720px; }
.post { padding: 72px 0 40px; }
.post-back-top { margin: 0 0 32px; font-size: 13px; }
.post-back-top a, .post-back a { color: var(--text-mut); border: 0; }
.post-back-top a:hover, .post-back a:hover { color: var(--accent-2); }
.post-meta { color: var(--text-dim); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; margin: 0 0 14px; }
.post h1 { font-size: clamp(30px, 4.6vw, 46px); margin-bottom: 16px; max-width: 22ch; }
.post .tags { margin-bottom: 40px; }
.post-body { color: var(--text); font-size: 17px; line-height: 1.75; }
.post-body h2 { font-size: 23px; margin: 40px 0 14px; }
.post-body h3 { font-size: 17px; margin: 30px 0 10px; color: var(--text); }
.post-body p { margin: 0 0 1.1em; max-width: 70ch; color: var(--text-mut); }
.post-body strong { color: var(--text); font-weight: 600; }
.post-body em { color: var(--text); }
.post-body ul, .post-body ol { padding-left: 22px; margin: 0 0 1.2em; color: var(--text-mut); }
.post-body li { margin: 7px 0; }
.post-body li::marker { color: var(--accent); }
.post-body code {
  font-family: var(--font-mono); font-size: 14px;
  background: var(--bg-1); border: 1px solid var(--line-soft);
  padding: 2px 6px; border-radius: 5px; color: var(--accent-2);
}
.post-body pre {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 18px 20px;
  overflow-x: auto; font-size: 14px; line-height: 1.6;
  margin: 0 0 1.4em;
}
.post-body pre code { background: transparent; border: 0; padding: 0; color: var(--text); }
.post-body blockquote {
  margin: 0 0 1.2em; padding: 6px 20px;
  border-left: 2px solid var(--accent);
  color: var(--text-mut); font-style: italic;
}
.post-body hr { border: 0; border-top: 1px solid var(--line-soft); margin: 40px 0; }
.post-body a { color: var(--accent-2); border-bottom-color: var(--line); }
.post-body a:hover { color: var(--text); border-bottom-color: var(--accent); }
.post-back { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line-soft); font-size: 14px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
